From cgenolin at u-paris10.fr  Sun Apr 13 23:36:41 2008
From: cgenolin at u-paris10.fr (cgenolin at u-paris10.fr)
Date: Sun, 13 Apr 2008 23:36:41 +0200
Subject: [Rd] R 2.7 package.skeleton
In-Reply-To: <48025B01.3060605@r-project.org>
References: <20080413195655.73lre8qlw8ssoks8@icare.u-paris10.fr>
	<480252E0.9080404@r-project.org> <4802557F.8040900@r-project.org>
	<48025B01.3060605@r-project.org>
Message-ID: <20080413233641.wksc2onnmscgw4c8@icare.u-paris10.fr>

> However, try this example with the corrected package.skeleton() as well.

I did, it is working

Thanks

Christophe

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



----------------------------------------------------------------
Ce message a ete envoye par IMP, grace a l'Universite Paris 10 Nanterre



[Rd] R 2.7 package.skeleton
cgenolin at u-paris10.fr