简体   繁体   English

安装R软件包时出错

[英]Error installing a R package

I'm trying to follow the steps in: 我正在尝试遵循以下步骤:

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

for installing a R package. 用于安装R软件包。 All goes smoothly, until the part that I go to shell and run: 一切顺利,直到我要运行的部分为止:

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

Then I keep receiving the error: 然后,我继续收到错误:

"error reading file '~/linmod/DESCRIPTION" “错误读取文件'〜/ linmod / DESCRIPTION”

the file is there, when I gedit the same address the file opens. 文件在那里,当我编辑相同的地址时,文件打开。 When I test the following line in shell: 当我在shell中测试以下行时:

R CMD check ./linmod linmod" R CMD检查。/linmodlinmod”

I receive the following error: 我收到以下错误:

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

I think the problem should be with the description file. 我认为问题应该出在描述文件上。 however I'm basically copy pasting what is said in the paper. 但是我基本上是复制粘贴论文中所说的内容。

The following is the content of my DESCRIPTION file: 以下是我的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

Where am I making a mistake? 我在哪里出错?

Cheers 干杯

Put 4 spaces in front of the second line for "Description" 在第二行的“描述”前放置4个空格

If you need multiple lines for a field you need to indent 如果一个字段需要多行,则需要缩进

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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