Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error installing a R package

Tags:

r

cran

r-package

I'm trying to follow the steps in:

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

for installing a R package. All goes smoothly, until the part that I go to shell and run:

"R CMD INSTALL -l /path/to/library linmod"

Then I keep receiving the error:

"error reading file '~/linmod/DESCRIPTION"

the file is there, when I gedit the same address the file opens. When I test the following line in shell:

R CMD check ./linmod linmod"

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:

Package: linmod
Title: Linear Regression
Version: 1.0
Date: 2008-05-13
Author: Friedrich Leisch
Maintainer: Friedrich Leisch <[email protected]>
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

like image 854
Theoden Avatar asked Mar 28 '26 17:03

Theoden


1 Answers

Put 4 spaces in front of the second line for "Description"

If you need multiple lines for a field you need to indent

like image 199
Lev Kuznetsov Avatar answered Mar 31 '26 09:03

Lev Kuznetsov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!