you could run source(directory/textfilename.txt) [and then you can use it in R]
or paste the function into the console,
or highlight and pass the function from the built in R text editor,
or highlight and pass the function from your external text editor (notepad++,
emacs, textwrangler, etc.)
On Mar 15, 2011, at 9:21 AM, bra86 wrote:
How could one get started with a self-written function?
I have a function written in .txt format, but can not find the way
to import
it to the R space.
Would be very appreciated for help.
It would be more typical to use a file extension of .r but I
source("myfunction.R") is the usual approach. You could also
just copy your code and paste it into the R console.
Sarah
On Tue, Mar 15, 2011 at 9:21 AM, bra86 wrote:
> How could one get started with a self-written function?
> I have a function written in .txt format, but can not find the way to
3 matches
Mail list logo