r - How to use Rstudio relative paths -


how can use relative paths in rstudio project environment?

for example, access file, use whole path:

# rstudio project working directory:  getwd() [1] "c:/users/mauriziolocale/onedrive/data_science/10_capstone_project/      cp_natural_language/my_file.txt" 

but long.

i trying use paths relative working environment. tried conceptually similar to:

"~/my_file.txt" 

where ~ represents working environment. unfortunately, not work.

you change working directory. address in beginning getwd(), replace project folder setwd(). then, when accessing file use read.table("./folder/file.r") pointed out @roman.


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -