[R] writing R extension

ahmad ajakh aajakh at yahoo.com
Wed Dec 20 20:30:04 CET 2006


Hi all,
I am dealing with the same issue here and I was wondering whether it would be possible to just save
the R compliled function objects in a directory and just attach the directory to the search path.
(I am using R2.4.0+ESS+Xemacs in windows XP). 

Thanks.
AA.


----- Original Message ----
From: Sarah Goslee <sarah.goslee at gmail.com>
To: michele de meo <vbarstat at gmail.com>
Cc: r-help at stat.math.ethz.ch
Sent: Wednesday, December 20, 2006 12:09:47 PM
Subject: Re: [R] writing R extension

For a very simple library, you really only need chapter 1 of the manual
on writing R extensions, which even describes the "helper functions"
that take some of the work out of making a "proper" package.

If that's still too complex, you could also save your function to a file
and load it as needed with source(). That will give the user the
same effect.

source("/path/to/my/stuff/myfiles.R")

Since you didn't tell us OS or anything else about your system,
it's hard to be more specific.

Sarah

On 12/20/06, michele de meo <vbarstat at gmail.com> wrote:
> I'd like to develop a simple library in R in which to save my
> particular functions.
> I have read the manual on "Writing R Extensions" but it's too
> difficult. Someone could help me?
>
> I want only save my personal function (recorded in R-code, not in C) in
> "myLibrary" and I want to call it with:
>
>  >library (myLibrary).
>
> After this, the functions should be available directly in R.
>
> I know that it's possible to save functions in the workspace, but I
> need this functions in a library.
>


-- 
Sarah Goslee
http://www.stringpage.com
http://www.functionaldiversity.org

______________________________________________
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
and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list