[R] Test Case for Package

Uwe Ligges ligges at statistik.tu-dortmund.de
Wed Oct 19 14:16:31 CEST 2011



On 19.10.2011 10:13, Vikram Bahure wrote:
> Hi,
>
> I had a query for writing a test case for a package.
>
> If we are testing a function then do we need to call that function for
> testing; library(mypackage)? Is that any circular logic any way.
>
> For eg. if I create a package mypackage, can I have a file mypackagetest in
> the tests directory whose line is library(mypackage).


Yes, actually it won't work without such a call to library() or 
require() ...

Uwe Ligges


> It would be helpful if I could get some input on this.
>
> Regards
> Vikram
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list