Skip to content

How to reuse my self function?

5 messages · Usuario R, Tony, Paul Hiemstra +1 more

#
I usually use the ?source function.

so at the top of your test2.R file, you would put a line like:

source('C:\\test1.R')

but with the correct path to where ever you have stored your test1.R
file.

Hope that helps a little,
Tony
On 4 Mar, 10:29, Chang Jia-Ming <chang.jiam... at crg.es> wrote:
#
Hi,

You can use the source() function to load functions from other files, like:

source("test1.R")

cheers,
Paul
Chang Jia-Ming wrote: