R - How to set the path of install.packages() for shiny server ? - Ubuntu

后端 未结 2 980
無奈伤痛
無奈伤痛 2021-01-03 02:13

For my system: Ubuntu 12.04 and R 3.03, whenever I install a custom package in R via

>install.packages(         


        
2条回答
  •  北荒
    北荒 (楼主)
    2021-01-03 02:26

    Yes -- I consider this to be a misfeature and disable my per-user directory.

    Moreover, I mostly use a script install.r (of which a version is an example in the littler package you can install as part of Ubuntu) which simple explicitly set the /usr/local/lib/R/site-library directory as the default. With a patch we got into R 3.0.2 or 3.0.3, normal user can write into the directory and will now create group-writeable directories so other users can update and overwrite -- just make everybody a member of the same group, say staff or admin. And then you don't even need sudo or root.

    I have essentially answered this same question a few times here over the years (minus the shiny angle, which is not really relevant) so feel free to search for the other for more details, examples, ...

提交回复
热议问题