我正在尝试遵循以下步骤:

https://cran.r-project.org/doc/contrib/Leisch-CreatingPackages.pdf

用于安装R软件包。一切顺利,直到我要运行的部分为止:

“R CMD安装-l / path / to / library linmod”

然后我继续收到错误:

“错误读取文件'〜/ linmod / DESCRIPTION”

文件在那里,当我编辑相同的地址时,文件打开。
当我在shell中测试以下行时:

R CMD检查。/linmodlinmod”

我收到以下错误:

 Error : file **'~/linmod/DESCRIPTION' is not in valid DCF format
 EXISTS but not correct format****

我认为问题应该出在描述文件上。但是我基本上是复制粘贴论文中所说的内容。

以下是我的DESCRIPTION文件的内容:
Package: linmod
Title: Linear Regression
Version: 1.0
Date: 2008-05-13
Author: Friedrich Leisch
Maintainer: Friedrich Leisch <Friedrich.Leisch@R-project.org>
Description: This is a demo package for the tutorial "Creating R
Packages" to Compstat 2008 in Porto.
Suggests: MASS
License: GPL-2

我在哪里弄错了?

干杯

最佳答案

在第二行的前面放置4个空格用于“描述”

如果一个字段需要多行,则需要缩进

10-02 18:02