Install R package from source, without changing PATH (Windows)

前端 未结 1 1190
离开以前
离开以前 2021-01-03 08:03

I\'m trying to install package rpart for R-2.14.0 on Windows 7, but I get the warning:

package ‘rpart’ is not available (for R version 2.

相关标签:
1条回答
  • 2021-01-03 08:50

    Since you have to set the PATH, but you're hesitant to do so because you're afraid you may hose something up, you can do it temporarily in your R session via:

    pathRtools <- paste(c("c:\\Rtools\\bin",
      "c:\\Rtools\\MinGW\\bin",
      "c:\\MiKTeX\\miktex\\bin",
      "c:\\R\\bin\\i386",
      "c:\\windows",
      "c:\\windows\\system32"), collapse=";")
    Sys.setenv(PATH=paste(pathRtools,Sys.getenv("PATH"),sep=";"))
    
    0 讨论(0)
提交回复
热议问题