I have a R program in a txt file say "functions.txt"
.
I load the "functions.txt"
file the R using source("function.txt")
and then call functions f1()
, f2()
etc. which are declared and defined within
"function.txt"
file.
I also need to load a couple of R libraries using library()
before I can use f1()
, f2()
etc.
My question is can I acheive all this (i.e. calling function f1()
and f2()
) from the windows prompt without opening the R environment ?
So essentially I want to
- load the R libraries I need to run
f1()
,f2()
etc. - load the
function.txt
file - run the individual functions f1() etc.
- record the result
all from from the command promt of windows c:\>
I have windows version of R installed in my computers.
It would be very kind of anyone to give a detailed answer as I am not very computer savvy.
Regards