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

libGdx unable to find files in android application data directory -

php - Webix Data Loading from Laravel Link -

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