简体   繁体   中英

Install own R package

I want to install a local package. I tried:

install.packages("C:/Users/Name/Dropbox...Rpackage/", repos = NULL, type="source")

which results in:

Warning: invalid package 'C:/Users/Name/Dropbox...Rpackage/'
Error: ERROR: no packages specified
Warning in install.packages :
  installation of package ‘C:/Users/Name/Dropbox...Rpackage/’ had non-zero exit status

I will be thankful for advice!

The syntax of your call to install.packages() is incorrect. If you are trying to install a local development package from its source directory (ie the folder containing DESCRIPTION, NAMESPACE, R/, etc.) you can either:

  • Navigate to the folder and run devtools::install() or R CMD INSTALL from a terminal.
  • Utilize remotes::install_local() pointing to the directory.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM