Re: [R] access data inside package

2008-01-20 Thread Dan Kelley
Thanks, Uwe, this works perfectly. Uwe Ligges-3 wrote: > > hits=-2.6 tests=BAYES_00 > X-USF-Spam-Flag: NO > > > First call > >data("d") > > then everything is fine already - except that codetools are moaning > around. Those codetools can be calmed down by the line we had already: > >

Re: [R] access data inside package

2008-01-20 Thread Duncan Murdoch
On 20/01/2008 3:21 PM, Dan Kelley wrote: > The technique > d <- get("d", pos=globalenv()) > doesn't work for me. It just says that it cannot get "d", even though I > have a data/d.rda file. > > Do I have to do something special with namespaces, to find it? > > PS. a possibly-related link i

Re: [R] access data inside package

2008-01-20 Thread Uwe Ligges
hits=-2.6 tests=BAYES_00 X-USF-Spam-Flag: NO First call data("d") then everything is fine already - except that codetools are moaning around. Those codetools can be calmed down by the line we had already: d <- get("d", pos=globalenv()) Uwe Ligges Dan Kelley wrote: > Yes, data() work

Re: [R] access data inside package

2008-01-20 Thread Dan Kelley
My "R CMD check" gives me fit.tide: no visible binding for global variable ‘tideconst’ when I do load(paste(system.file(package="oce"),"data/tidesetup.rda",sep="/")) ... try to use tideconst ... where tidesetup.rda holds, among other things, a variable named "tideconst". I guess I can

Re: [R] access data inside package

2008-01-20 Thread Benilton Carvalho
then combine system.file() with load(). b On Jan 20, 2008, at 3:40 PM, Dan Kelley wrote: Yes, data() works, but then I have this warning from "R CMD check" on my package, so I think I should not be doing it that way. Benilton Carvalho wrote: have you tried data() instead? b -- Vie

Re: [R] access data inside package

2008-01-20 Thread Dan Kelley
Yes, data() works, but then I have this warning from "R CMD check" on my package, so I think I should not be doing it that way. Benilton Carvalho wrote: > > have you tried > data() > instead? > b > > > -- View this message in context: http://www.nabble.com/access-data-inside-package-tp14

Re: [R] access data inside package

2008-01-20 Thread Benilton Carvalho
have you tried data() instead? b On Jan 20, 2008, at 3:21 PM, Dan Kelley wrote: The technique d <- get("d", pos=globalenv()) doesn't work for me. It just says that it cannot get "d", even though I have a data/d.rda file. Do I have to do something special with namespaces, to find it? P

Re: [R] access data inside package

2008-01-20 Thread Dan Kelley
The technique d <- get("d", pos=globalenv()) doesn't work for me. It just says that it cannot get "d", even though I have a data/d.rda file. Do I have to do something special with namespaces, to find it? PS. a possibly-related link is as follows. http://www.nabble.com/how-to-make-read-on

Re: [R] access data inside package

2008-01-02 Thread Uwe Ligges
baptiste Auguié wrote: > Thanks, that works for me! > > On 1 Jan 2008, at 15:47, Uwe Ligges wrote: >> >> baptiste Auguié wrote: >>> Dear all, >>> Happy new year! >>> I posted a very similar question a few days ago, but probably too >>> cluttered. Here is a tidy, minimal version: >>> I want to

Re: [R] access data inside package

2008-01-02 Thread baptiste Auguié
Thanks, that works for me! On 1 Jan 2008, at 15:47, Uwe Ligges wrote: > > baptiste Auguié wrote: >> Dear all, >> Happy new year! >> I posted a very similar question a few days ago, but probably too >> cluttered. Here is a tidy, minimal version: >> I want to make a package, with a data.frame d a

Re: [R] access data inside package

2008-01-01 Thread Uwe Ligges
baptiste Auguié wrote: > Dear all, > > Happy new year! > > I posted a very similar question a few days ago, but probably too > cluttered. Here is a tidy, minimal version: > > I want to make a package, with a data.frame d and a function f given > below. Now, the function f needs to use the

[R] access data inside package

2008-01-01 Thread baptiste Auguié
Dear all, Happy new year! I posted a very similar question a few days ago, but probably too cluttered. Here is a tidy, minimal version: I want to make a package, with a data.frame d and a function f given below. Now, the function f needs to use the data.frame d. I could (and that's what I'