[Rd] tests Rin and Rout

cgenolin at u-paris10.fr cgenolin at u-paris10.fr
Mon Mar 31 10:58:33 CEST 2008


Martin Maechler <maechler at stat.math.ethz.ch> a écrit :

>>>>>> "CG" == Christophe Genolini <cgenolin at u-paris10.fr>
>>>>>>     on Mon, 31 Mar 2008 00:31:55 +0200 writes:
>
>    >>
>    >> Generally I find it's good to look at examples that work.
>    >> For examples of packages using tests, look at source
>    >> packages on CRAN.  Run the tests on them (using R CMD
>    >> check), and see what gets produced.
>    >>
>    CG> Do you have the name of a package that use it ? I try
>    CG> the 10 first package, and 10 other at random, but none
>    CG> of them use tests...
>
> hmm, I see 219 out 1378 CRAN packages having a 'tests'
> subdirectory, so it seems you have been a bit unlucky. ;-)

Do you imply that I say I try and I did not ?
Well, lets check that :

P_unluck_1   <- 1-(219/1379)
(P_unluck_10 <- P_unluck_1^10)
[1] 0.1773933

So P>0.05, once can not say that I am not a liar.
Further investigation are needed :-)

> Isn't all this is explained nicely in the "Writing R Extensions" Manual?

NO ! There is 8 lines on it, and the structure of the Rin and Rout is 
not given. The writing R Ext. say "the Test code can be in .R or in 
.Rin" but I do not know what "test code" is suppose to be. I try simple 
things like some function with argument, but it does not works. I try 
more complicated things, I did not manage to find the right things to 
do.

It also say ".Rin file containing code which in turn in .R", but there 
is also no information about the what the .Rin should be. May be it is 
obvious for some people, but not for me.

> Or are there sections we should expand ?

I do not know, if there is only few people using it, may be it is not 
worth. I guess you have so many other thinks to do...
On the other hand, if some tool are to difficult to understand, it is 
normal that people do not use them... I don't know.

I will work on package example that Pr Ripley point to me. Then when I 
will have understand the way it works, would you like me to add little 
paragraph in "Writing R extention" ? I mean, not an paragraph by expert 
but a paragraph by a regular medium level user for some other regular 
medium level user.

> For answering your subsequent questions, you should probably
> both look at an example package *and* read the 'Writing R
> Extensions' manual a bit more "closely".

Well, I try to not disturb people for little obvious thinks. I can tell 
you I did work hard before asking, specialy before asking on r-devel...

Christophe




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



More information about the R-devel mailing list