Re: [R] RUnit - need advice on a good directory structure or tips...

From: Seth Falcon <>
Date: Tue 07 Feb 2006 - 04:30:08 EST

On 3 Feb 2006, wrote:

> I made my own RUnit testing convention, and I want to introduce this
> to one of my friends. Before that, I'd like to review my codes.
> The problem that I met when I tried to polish my codes is: How can I
> get the file path in the file???
> I.e., I want to get the path to the file that I'm writing using some magic R
> functions. But I couldn't find any good magic.
> Is there any magic?

I think the best thing would be to put your code into a package and then decide upon a convention for RUnit testing that relies upon the known structure of the package.

I've been putting RUnit tests in inst/unitTests in some of the packages I work on and have a makefile in that directory that can reinstall the package and run the tests. It isn't all that elegant, but I don't have to do any guessing about where the code is.

HTH, + seth mailing list PLEASE do read the posting guide! Received on Tue Feb 07 04:38:37 2006

This archive was generated by hypermail 2.1.8 : Tue 07 Feb 2006 - 08:36:18 EST