How do I install an R package from source?

后端 未结 6 686
半阙折子戏
半阙折子戏 2020-11-22 01:46

A friend sent me along this great tutorial on webscraping NYtimes with R. I would really love to try it. However, the first step is to installed a package called RJSONIO fro

6条回答
  •  有刺的猬
    2020-11-22 02:30

    If you have the file locally, then use install.packages() and set the repos=NULL:

    install.packages(path_to_file, repos = NULL, type="source")
    

    Where path_to_file would represent the full path and file name:

    • On Windows it will look something like this: "C:\\RJSONIO_0.2-3.tar.gz".
    • On UNIX it will look like this: "/home/blah/RJSONIO_0.2-3.tar.gz".

提交回复
热议问题