Trouble installing an R package using R CMD install

wdkrnls

I just ran the following command after running R CMD build pkg and R CMD check pkg and it completed without errors.

R CMD install -t /home/wdkrnls/R/x86_64-unknown-linux-gnu-library/3.1 pkg_0.1.0.tar.gz

However, I still can't use it via library(pkg) from R. Looking in the library directory, all I see is the tarball, no pkg directory. When I try and untar it and then load in R, I get the error:

Error in library(e2pa) : 'e2pa' is not a valid installed package

Alternatively, when I try to install with

R CMD install -l /home/wdkrnls/R/x86_64-unknown-linux-gnu-library/3.1 pkg_0.1.0.tar.gz

It tells me -l is an invalid option.

Another failed possibility:

R CMD install -t /home/wdkrnls/R/x86_64-unknown-linux-gnu-library/3.1/pkg pkg_0.1.0.tar.gz install: accessing `/home/wdkrnls/R/x86_64-unknown-linux-gnu-library/3.1/pkg': No such file or directory

What is the right way to install a package into a personal library in R?

Dirk Eddelbuettel

Unix commands are case-sensitive and

 R CMD install ....

as you typed invokes a different /usr/bin/install than the R-internal script INSTALL which the actually mandated form

 R CMD INSTALL ...

uses. See all the relevant docs -- it is always UPPERCASE.

Once you have the correct script, -l ... is recognised:

[email protected]:~$ R CMD INSTALL -l /tmp/demo git/drat_0.0.2.4.tar.gz 
* installing *source* package ‘drat’ ...
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (drat)
[email protected]:~$ 

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

CRAN发现R CMD检查--as-cran没有警告

来自分类Dev

Unable to install XML package in R on CentOS

来自分类Dev

R CMD install:在新安装之前清理libs

来自分类Dev

R tm package and cyrillic text

来自分类Dev

为什么(或何时)Rscript(或更小)优于R CMD BATCH?

来自分类Dev

使用cmd中的参数调用R函数

来自分类Dev

Installing lattice in R: "Error : Invalid DESCRIPTION file"

来自分类Dev

如何指定R CMD exec目录?

来自分类Dev

从Windows CMD安装R软件包

来自分类Dev

Getting help of R function using help_console function from noamtools R package

来自分类Dev

Rscript和R CMD BATCH的结果不同

来自分类Dev

Unable to install cachem package for R

来自分类Dev

R-Package“闪亮”。如何退出程序?

来自分类Dev

使用R CMD安装无法安装R软件包

来自分类Dev

How to use R CMD Install without dependencies check?

来自分类Dev

如何在不进行依赖检查的情况下使用R CMD Install?

来自分类Dev

data.table可在控制台中使用,但由于R CMD INSTALL而失败

来自分类Dev

重新加载热键cmd + r不起作用

来自分类Dev

Forecast package Prediction Horizon issue in R

来自分类Dev

CMD变量未在/ r循环中解析

来自分类Dev

在R CMD检查中禁用构建PDF

来自分类Dev

R-package的添加和编辑功能

来自分类Dev

Github操作-R包R-CMD-Check“ PhantomJS not found”

来自分类Dev

R:向Windows的cmd发送多个命令

来自分类Dev

R CMD install:在新安装之前清理libs

来自分类Dev

Installing R-base in Linux Mint 17.1 Cinnamon

来自分类Dev

R:install.package()未在CentOS 6.5上调用编译器

来自分类Dev

在 R 中运行 Windows CMD

来自分类Dev

package.R 無法解決