[R] program and comment

Dirk De Becker dirk.debecker at biw.kuleuven.be
Wed Apr 26 10:43:34 CEST 2006

Guojun Zhu wrote:

>Hi.  I am a newbie to R. I need to do a courses
>projects with some manipulation lots of data record
>and some back-and-forth linear regression.  I do not
>want to spend $100 for a SAS lincence, which professor
>used.  So I decide to start to learn R to finish it. 
>I am using R in Windows.  I feel it is somehow works
>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".  One thing
>puzzles me is that how to write  comments in the
>script.  I googled internet and the archive and did
>not find any clues.  
>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.  Second, can anyone show me some idea
>about how to write  the comment.  Thanks.
It seems a good idea to me to add all your commands in a script and to 
source it in order to execute it.
Comments can be added in R simply by starting a line with a #



Dirk De Becker
Work: Kasteelpark Arenberg 30
      3001 Heverlee
      phone: ++32(0)16/32.14.44
      fax: ++32(0)16/32.85.90
Home: Waversebaan 90
      3001 Heverlee
      phone: ++32(0)16/23.36.65
dirk.debecker at biw.kuleuven.be
mobile phone: ++32(0)498/51.19.86

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

More information about the R-help mailing list