Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

setting the home directory in windows R [duplicate]

Possible Duplicate:
Change path.expand location (Win 7)

I would like to change the directory that path.expand("~/") references on a windows system. Currently this goes to "C:/Users/home/Documents/" by default. How does one change this? Note that this is distinct from the working directory that is set with setwd()

like image 361
Alex Avatar asked Oct 22 '12 17:10

Alex


1 Answers

You can change this by adding an R_USER variable to your Rprofile.site file.

Sys.setenv(R_USER="/my/desired/path/to/tilde")

This does not work on linux systems. See a related question: How to reset path.expand on tilde

like image 194
Brandon Bertelsen Avatar answered Sep 20 '22 22:09

Brandon Bertelsen