如何使用devtools :: install_local在本地安装r包

时间:2017-09-21 03:06:32

标签: r package devtools

我有以下R套餐:

ubuntu@ip-111-31-16-140:~/storage1/homebrew_rpackages/mypackr$ pwd
/home/ubuntu/storage1/homebrew_rpackages/mypackr

结构是:

ubuntu@ip-172-31-16-140:~/storage1/homebrew_rpackages/mypackr$ tree
.
|-- DESCRIPTION
|-- NAMESPACE
|-- R
|   |-- hello.R
|   `-- tsne_pca.R
|-- mypackr.Rproj
`-- man
    |-- hello.Rd
    `-- plot_tsne_pca.Rd

我尝试做的是以这种方式在本地安装,但出错:

> devtools::install_local("/home/ubuntu/storage1/homebrew_rpackages/mypackr")
Installation failed: trying to get slot "name" from an object of a basic class ("NULL") with no slots

做正确的方法是什么?

1 个答案:

答案 0 :(得分:0)

您必须在软件包的git存储库中至少执行一次提交。