Re: [Rd] R 2.7 package.skeleton

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

Well, the workaround does not help much. The source files will be copied to the new package, but they are not evaluated (because package.skeleton requires list= to be missing). Therefore you won't have the documentation files reflecting the contents of essai.r

So, for the moment, this just seems to be a bug needing fixing. Merci et ne quittez pas.

John

John Chambers wrote:
> 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
>
>

        [[alternative HTML version deleted]]



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sun 13 Apr 2008 - 18:53:35 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 - 22:31:14 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