小编for*_*per的帖子

devtools描述文件

我正在尝试使用devtools创建一个包.我想设置几个选项,以便自动填充DESCRIPTION文件.我似乎无法做对.

我认为这是一个可以轻松手动修复的问题,但我希望这可以在代码中使用.担心错误会影响我以后.关于适当语法的任何建议?我的功能在一个名为"R"的文件夹中.我将我的工作目录设置为R的父文件夹.然后:

library(devtools)

install_github("devtools")

options(devtools.desc.author="First Last <first.last@example.com> [aut, cre]")

options(devtools.desc.license="GPL-3")

load_all()
Run Code Online (Sandbox Code Playgroud)

这输出:

No DESCRIPTION found. Creating default:

Package: mypackage
Title: 
Description: 
Version: 0.1
Authors@R: First Last <first.last@example.com> [aut, cre]
Depends: R (>= 3.0.1)
License: GPL-3
LazyData: true
Loading mypackage
Invalid DESCRIPTION:
Malformed Authors@R field:
 <text>:1:7: unexpected symbol
1: First Last
         ^

Required fields missing:
  Author Maintainer

See the information on DESCRIPTION files in section 'Creating R packages' of the 'Writing R Extensions' manual.
Run Code Online (Sandbox Code Playgroud)

我知道在某种程度上,Authors @ R字段可以/在某种程度上取代Maintainer字段,但想知道如何让它停止抛出错误,以及它们的含义.

提前致谢!

r devtools package

13
推荐指数
1
解决办法
4559
查看次数

标签 统计

devtools ×1

package ×1

r ×1