Skip to content

programming in R

5 messages · Jason Turner, Alexandra Patriksson, Jonathan Baron +2 more

#
On Mon, Aug 12, 2002 at 05:55:43PM +0200, Alexandra Patriksson wrote:
...
No, 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.
Sure, for trying things out.  If you want to save what you did, help(savehistory)
will tell you how.
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.
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
#
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:
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,
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.
I don't think you can do this.
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.
#
Can somebody help me with some introductory R slides in ppt?
Thank you for your help.
#
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?
-.-.-
http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._