Change R default library path using .libPaths in Rprofile.site fails to work

后端 未结 15 2649
青春惊慌失措
青春惊慌失措 2020-11-22 06:27

I am running R on Windows, not as an administrator. When I install a package, the following command doesn\'t work:

> install.packages(\"zoo\")
Installing          


        
15条回答
  •  旧巷少年郎
    2020-11-22 07:05

    If your default package library has been changed after installing a new version of R or by any other means, you can append both the libraries to use all the packages with the help of the commands below. Get the existing library path :

    .libPaths()

    Now,set the existing and the old path :

    .libPaths(c(.libPaths(), "~/yourOldPath"))

    Hope it helps.

提交回复
热议问题