Re: [R] path and R CMD check

From: Uwe Ligges <ligges_at_statistik.tu-dortmund.de>
Date: Fri, 25 Jul 2008 11:01:09 +0200

Christophe Genolini wrote:
> Hi the list,
>
> When I developpe my code, I put the file that define all the functions
> in ./MyPack/R/prog.R and the tests in ./MyPack/tests/testsProg.R
> The test files start by
>
> load("../data/myData.rda")
> source("../R/prog.R")
> #test function number one...
>
> But "R CMD check MyPack" does not find the file myData.rda.
> Does someone knows what is wrong ?

Read Writing R Extensions, learn how a package works (and yes, it works without sourcing files separately since the package mechanism does the job for you) and just say:

library("packagename")
data("myData")

Best wishes,
Uwe Ligges

> Christophe
>
> ______________________________________________
> 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.



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. Received on Fri 25 Jul 2008 - 09:03:11 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 25 Jul 2008 - 13:32:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive