Re: [Rd] R 2.7 package.skeleton

From: John Chambers <jmc_at_r-project.org>
Date: Sun, 13 Apr 2008 11:37:20 -0700

Seems to be an R bug in evaluating the source code in your file.

As the message says, something is trying to evaluate the "list" argument to package.skeleton. My guess is that it's the unfortunate choice of "list" as an argument name interacting with your use of list() in the code in essai.r (By the language semantics a function and a non-function with the same name _should_ be ok, but the fact that there is no default may be triggering a difficulty in sys.source())

To make life more difficult, package.skeleton does not seem to like a zero-length list= argument either. The following is an ugly way to avoid the error, by creating a list with one object.

 > nul <- ""
 > package.skeleton("kmt", code_files = "essai.r", list = "nul") Creating directories ...
Creating DESCRIPTION ...
Creating Read-and-delete-me ...
Copying code files ...
Making help files ...
Done.
Further steps are described in './kmt/Read-and-delete-me'.

cgenolin_at_u-paris10.fr wrote:
> Hi the devel list
>
> I am testing package.skeleton in R 2.7 (download today). I get an error
> that I do not understand. I guess it is not an error from my code since
> I have no probleme when I source it. So is it a error in
> package.skeleton?
>
> Here is my code :
>
>
> --- 8< ------ File essai.r -------------
> setClass(
> Class="ClusterizLongData",
> representation=representation(
> clusterizS="list"
> ),
> prototype=prototype(
> clusterizS=list(c2=list(),c3=list())
> )
> )
> --- 8< ---------------------------------
>
>
> package.skeleton("kmt",code_files=c("essai.r"))
>
> Erreur dans .prototype(...) : l'argument "list" est manquant, avec
> aucune valeur par défaut
>
> [approximative translation :
> Error in .prototype(...) :
> the argument "list" is missing, with no default value
> ]
>
>
> Christophe
>
> ----------------------------------------------------------------
> Ce message a ete envoye par IMP, grace a l'Universite Paris 10 Nanterre
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sun 13 Apr 2008 - 18:39:38 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 13 Apr 2008 - 19:31:09 GMT.

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

list of date sections of archive