Re: [R] Problems creating packages.

From: Jay Emerson <jayemerson_at_gmail.com>
Date: Sat 24 Jun 2006 - 23:54:23 EST


> I'm creating my own package for personal and I'm having trouble
> getting it to a point where R (v 2.3.1) will recognise it. I've
> followed two different tutorials for how to create the package
> structure and the DESCRIPTION file (
> http://web.maths.unsw.edu.au/~wand/webcpdg/rpack.html ,
>
http://www.maths.bris.ac.uk/~maman/computerstuff/Rhelp/Rpackages.html#Lin-Lin
> . I'm still getting errors where when I try to load the library in R
> by using library(samp) I get an error:
>
> Error in library(samp) : 'samp' is not a valid package -- installed <
2.0.0?

I'm going out on a limb, here, but others were quick to offer me advice and I didn't yet see
a reply to your query. I assume (from the links you provide and the use of sudo) that you
are working in Linux. Your R CMD check fails to find latex, which would be my first cause
for concern. Either you have an old or unusual linux system (unlikely) or there appears to
be a path problem (much more likely are probably related to using sudo). That is worth
tracking down, though it probably isn't the primary (or even the most R-specific) problem.

I don't think the problem is related to the contents of your files, per se, but rather the
organization of the files and folders in the source package. I had success starting with
package.skeleton() and working from there. The error about "only *source* packages
can be checked" is something I encountered once when I tried R CMD check on a
binary package rather than a source package (a binary package would be produced
by "R CMD build --binary packagename" once you get to that point), and a source package
is a beast of the form produced by package.skeleton().

I'm a newbie to making packages myself, and apologize for any inaccuracies or errors
above (and please correct me, folks)!

Regards,

Jay

-- 
John W. Emerson (Jay)
Assistant Professor of Statistics
Yale University
http://www.stat.yale.edu/~jay

	[[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Sun Jun 25 00:03:23 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sun 25 Jun 2006 - 02:11:47 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.