Skip to content
Prev 22614 / 398502 Next

programming in R

You can write your code at the R prompt to test things out, but when you are ready to write up procedures or functions that you will want to repeat or otherwise document for future reference, you will want to write it up with an editor such as emacs.  I usually create a folder for each of my projects, and keep my data files and saved code in that folder (for example, I might have a folder called "c:/research/microarray" and a file called "c:/research/microarray/microarray.r" to hold the relevant code for that project.) 

R is an "interpretted" language, not a compiled language, so you don't need to compile it.  Just type your code into a file (e.g. "yourfile"), and then type:

source("yourfile")

at the R prompt.  (Also, R has a batch mode...but that is another topic).

Have you gone through the introductory session described starting on page 10 of the "Introduction to R" manual?  (http://cran.r-project.org/doc/manuals/R-intro.pdf)

hth,
Eric
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._