[R] Introduce a new function in a package?

roger bos roger.bos at gmail.com
Wed Apr 6 17:48:21 CEST 2005


I tried making a package on windows and got a "make" error, so I was
happy I was able to get source("mystuff.R") to work in .First(). 
Since my utility functions are pretty simple and few in number, this
is good enough for me for now.

But I got a curious error.  I can submit the command
"memory.size(3*1024)" at the command line and it works fine (I
modified my header file to make R \LARGEADDRESSAWARE), but if I put
that same command in .First R says it can't find a function
memory.size in the environment.  Can anyone recommend a cause and/or
work around?

Thanks,

Roger



On Apr 6, 2005 11:24 AM, Josef Eschgfaeller <esg at felix.unife.it> wrote:
> 
> > ~/.Rprofile
> 
> You could also write in .Rprofile soemthing like this:
> 
> for (x in dir("Mylibrary",full.names=T,recursive=T))
>   source(x)
> 
> where "Mylibrary" is a directory which
> contains your functions without making a package.
> 
> Josef Eschgfäller
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> 
>




More information about the R-help mailing list