Dumbo
Dumbo

Reputation: 14142

Change RStudio's default directory from home directory to somewhere else in GNU/Linux

I have installed rstudio on my gnu/linux machine. For some scripts it downloaded and compiled some packages in '/home/saeid/R`. I tend to keep my home directory clean, so I want to move this R directory to somewhere else. But I couldn't find any options in the RStudio that asks/sets the directory for these packages.

Here is the listing of packages in this directory:

saeid@vostro:~/R/x86_64-pc-linux-gnu-library/3.0$ ls -l
total 88
drwxrwxr-x  7 saeid saeid 4096 Nov  8 13:36 bitops
drwxrwxr-x  7 saeid saeid 4096 Nov  8 13:36 caTools
drwxrwxr-x  8 saeid saeid 4096 Nov  8 13:36 digest
drwxrwxr-x  6 saeid saeid 4096 Nov  8 13:36 evaluate
drwxrwxr-x  9 saeid saeid 4096 Nov  8 13:36 formatR
drwxrwxr-x  7 saeid saeid 4096 Nov  8 13:36 highr
drwxrwxr-x  7 saeid saeid 4096 Nov  8 13:36 htmltools
drwxrwxr-x  8 saeid saeid 4096 Nov  8 13:38 httpuv
drwxrwxr-x  9 saeid saeid 4096 Nov  8 13:38 jsonlite
drwxrwxr-x 14 saeid saeid 4096 Nov  8 13:36 knitr
drwxrwxr-x  7 saeid saeid 4096 Nov  8 13:36 magrittr
drwxrwxr-x 11 saeid saeid 4096 Nov  8 13:36 markdown
drwxrwxr-x  7 saeid saeid 4096 Nov  8 13:35 mime
drwxrwxr-x  7 saeid saeid 4096 Nov  8 13:38 R6
drwxrwxr-x 15 saeid saeid 4096 Nov  8 13:37 Rcpp
drwxrwxr-x  9 saeid saeid 4096 Nov  8 13:37 RJSONIO
drwxrwxr-x  8 saeid saeid 4096 Nov  8 13:36 rmarkdown
drwxrwxr-x 11 saeid saeid 4096 Nov  8 13:38 shiny
drwxrwxr-x  8 saeid saeid 4096 Nov  8 13:36 stringi
drwxrwxr-x  7 saeid saeid 4096 Nov  8 13:36 stringr
drwxrwxr-x  8 saeid saeid 4096 Nov  8 13:37 xtable
drwxrwxr-x  8 saeid saeid 4096 Nov  8 13:36 yaml

So the question is where should I change the path of this directory for RStudio (I think there should be some config files that allow this, but I couldn't find it yet).

Upvotes: 1

Views: 589

Answers (1)

Hao
Hao

Reputation: 7856

You can check out .libPaths().

Upvotes: 1

Related Questions