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'.
>
>
>
>
> [EMAIL PROTECTED] 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@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>>
>>     
>
> ______________________________________________
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>   

        [[alternative HTML version deleted]]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to