[R] writing comments within a function

vincent.stoliaroff@socgen.com vincent.stoliaroff at socgen.com
Fri Jun 6 14:38:52 CEST 2003


Thanks you everybody for all your answers



|---------+---------------------------->
|         |           th50 at leicester.ac|
|         |           .uk              |
|         |                            |
|         |           06/06/03 01:32 PM|
|         |                            |
|---------+---------------------------->
  >------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                              |
  |       To:       Vincent STOLIAROFF/fr/socgen at socgen, otoomet at econ.dk                                                         |
  |       cc:       r-help at stat.math.ethz.ch                                                                                     |
  |       Subject:  RE: [R] writing comments within a function                                                                   |
  >------------------------------------------------------------------------------------------------------------------------------|



> -----Original Message-----
> From: Ott Toomet [mailto:otoomet at econ.dk]
> Sent: 06 June 2003 12:05
> To: vincent.stoliaroff at socgen.com
> Cc: r-help at stat.math.ethz.ch
> Subject: Re: [R] writing comments within a function
>
>
>  | From: vincent.stoliaroff at socgen.com
>  | Date: Fri, 6 Jun 2003 11:57:32 +0200
>
> Hallo,
>
>  | Hi R lovers!
>  |
>  | I would like to know how you can write comments inside the
> code of a
>  | function
>  |
>  | is it latex style
>  | % ?
>  | or any other language style?
>
> It's #, otherwise like tex.  The same character is used by gnuplot and
> many configuration scripts and probably by many programming languages
> too.
>
> You may also consider
>
> if(FALSE) {
> ...
> }
>
> But this "comment" must be syntactically correct.  You may also
> consider emacs+ESS which includes possibilities to commenting and
> uncommenting large program blocks.
>
> I don't know where it is mentioned explicitly (I did not see it in "S
> Programming" (a book)), but most examples include comments, I guess.

It is stated in the "R Language Definition" manual, section 10.2, which
usually comes with the distribution.

Best wishes

Thomas






*************************************************************************
Ce message et toutes les pieces jointes (ci-apres le "message") sont
confidentiels et etablis a l'intention exclusive de ses destinataires.
Toute utilisation ou diffusion non autorisee est interdite. 
Tout message electronique est susceptible d'alteration. 
La SOCIETE GENERALE et ses filiales declinent toute responsabilite au 
titre de ce message s'il a ete altere, deforme ou falsifie.
				********
This message and any attachments (the "message") are confidentia... {{dropped}}




More information about the R-help mailing list