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

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -