Installing packages onto R

后端 未结 4 1227
广开言路
广开言路 2020-12-16 12:47

For some reason I am suddenly not able to install packages in R (I have subsequently updated to the latest version of R and am running Windows 7). For example, if I type:

4条回答
  •  北荒
    北荒 (楼主)
    2020-12-16 13:27

    The error being reported is inability to open a connection. In Windows that is often a firewall problem and is in the Windows R FAQ. The usual first attempt should be to run internet2.dll. From a console session you can use:

    setInternet2(TRUE)
    

    (You are correct in thinking this is not due to your library setup. The error says nothing about permissions.) I don't think just typing .libPaths should return that character vector since on my machine I would need to type .libPaths() to see something like that. If you wanted to reduce the number of places for libraries you can use the .libPaths function for setting the values. This would pick the second and third of the existing paths

     .libPaths( .libPaths()[2:3] )
    

    The inner call retrieves the path vector and the outer call sets it to a reduced vector.

提交回复
热议问题