[Rd] R 2.7 package.skeleton

John Chambers
Sun, 13 Apr 2008 18:37:20 -0000

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
>
>