[R] program and comment

Hans-Peter gchappi at gmail.com
Wed Apr 26 10:54:34 CEST 2006

2006/4/26, Guojun Zhu <shmilylemon at yahoo.com>:
> Hi.  I am a newbie to R. I need to do a courses

*do* have a look at e.g.:
- http://cran.r-project.org/manuals.html (An Introduction to R)
- http://www.ms.unimelb.edu.au/~andrewpr/r-users/icebreakeR.pdf 
(contributed manual)
- http://cran.r-project.org/doc/contrib/Short-refcard.pdf  (reference-card)

to search the archives you can use:
- http://tolstoy.newcastle.edu.au/R/about.html
- http://finzi.psych.upenn.edu/search.html

> I am using R in Windows.

Have a look at Tinn-R  (editor)

> like mathemica.  I try to write the work into a little
> program for future reference. (My data soon exceeds
> the workplace.) So that should be a script, right?


> Then I can load it in "file/source R code".

source( "yourScript.R" )

check working path: getwd()
if you don't know what this is:

> First, can anyone confirm that I took the correct
> approach for the problem?


I understand R is quite
> different from program language like C/Pascal which I
> am familiar with and seems people write it with quite
> different style.

it's a functional language and inherits from LISP (Scheme). You need
to read the manual.

>Second, can anyone show me some idea
> about how to write  the comment.  Thanks.

# this is a comment


More information about the R-help mailing list