On Mon, Aug 12, 2002 at 05:55:43PM +0200, Alexandra Patriksson wrote: ...> Do I have > to create my files in some editor like emacsNo, but it's easier once your commands get complicated. Check out the R-WinEdt if you're on Windows, too. If you're familiar with emacs, life get a lot easier with ESS and R.> or can I write my code in the R > prompt?Sure, for trying things out. If you want to save what you did, help(savehistory) will tell you how.> How to compile the code?You don't. R is an interpreted language. Compilation happens by running the code through R. The typical way most people start is with the source() command. help(source) will tell you what you need to know.> I haven't found any good manual parts about this subject.You need find the directory where R was installed (on Unix and Unix-like systems, /usr/local/lib/R is the default; under Windows c:\Program files\R\rw1051\ is the default for R-1.5.1). Under this directory, there is a "doc/manual/" directory, which should contain several pdf files. R-intro.pdf, chapter 1, section 10 details how to recall saved functions from file (created with your favorite editor), and chapter 10 answers the other questions that will arise once you start. It's a very good, readable, comprehensive introduction. If you want to write packages (custom functions with full documentation, possibly with compiled code libraries, etc), the R-exts.pdf document in the same directory is what you need (start with R-intro.pdf, though). Cheers Jason -- Indigo Industrial Controls Ltd. 64-21-343-545 jasont at indigoindustrial.co.nz -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
I have a probably basic problem concerning the R language. I will write some small R programs but don't really know how to start. Do I have to create my files in some editor like emacs or can I write my code in the R prompt? How to compile the code? I haven't found any good manual parts about this subject. regards A.P -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On 08/12/02 17:55, Alexandra Patriksson wrote:>I have a probably basic problem concerning the R language. >I will write some small R programs but don't really know how to start. Do I have >to create my files in some editor like emacs or can I write my code in the R >prompt?Both. But if it is more than just a few lines the editor method is a good idea. Then you save the file and run it with source(), e.g., at the R prompt,>source("myfile.R")You can also save the code that you write when you quit a session. But if you are like me it is 25% stuff I want and 75% mistakes. A good technique is to use ESS (Emacs Speaks Statistics), which allows you to go back and forth between the edited file that you will save and the R prompt. You can then easily "cut and paste" the commands that work.>How to compile the code?I don't think you can do this.>I haven't found any good manual parts about this subject.You might look at the R for psychology thing in my R page below. But I also think that this is in the manaul and in many of the contributed documents in CRAN. -- Jonathan Baron, Professor of Psychology, University of Pennsylvania Home page: http://www.sas.upenn.edu/~baron R page: http://finzi.psych.upenn.edu/ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Can somebody help me with some introductory R slides in ppt? Thank you for your help. -- Kenneth Roy Cabrera Torres Unviersidad Nacional de Colombia, Sede Medell?n Instituto de Ciencias Naturales y Ecolog?a Escuela de Geociencias e-mail krcabrer at unalmed.edu.co Tel +57 (4) 430-9308 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> -----Original Message----- > From: Alexandra Patriksson > [mailto:Alexandra.Patriksson.8520 at student.uu.se] > Sent: Monday, August 12, 2002 11:56 AM > To: r-help at stat.math.ethz.ch > Subject: [R] programming in R > > > I have a probably basic problem concerning the R language. > I will write some small R programs but don't really know how > to start. Do I have > to create my files in some editor like emacs or can I write > my code in the R > prompt? How to compile the code? > > I haven't found any good manual parts about this subject. > > regards > A.PYou 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Here is one I created last year. http://www.stat.auckland.ac.nz/~kwan022/pub/R/R_Intro.ppt ------------------------------------------------ Ko-Kang Kevin Wang Post Graduate PGDipSci Student Department of Statistics University of Auckland New Zealand www.stat.auckand.ac.nz/~kwan022 ----- Original Message ----- From: "Kenneth Cabrera" <krcabrer at perseus.unalmed.edu.co> Cc: <r-help at stat.math.ethz.ch> Sent: Tuesday, August 13, 2002 5:48 AM Subject: [R] Any introductory R Slides?> Can somebody help me with some introductory R slides in ppt? > Thank you for your help. > > -- > Kenneth Roy Cabrera Torres > Unviersidad Nacional de Colombia, Sede Medell?n > Instituto de Ciencias Naturales y Ecolog?a > Escuela de Geociencias > e-mail krcabrer at unalmed.edu.co > Tel +57 (4) 430-9308 > > > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-> r-help mailing list -- Readhttp://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 >_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. _._>-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._