On Aug 14, 2010, at 4:05 AM, Saji Ren wrote:

In response to JesperHybel,  saji wrote:

that's not a problem of {}.

Correct, as indicated by the continuation "+"

By using {} you can put the command in one line.

Actually the curly brackets are more often used to put a series of commands on successive lines. If you want to force a series of commands after an if() else construction then "{" will start the series and the interpreter will continue interpreting until it reaches the "}" possibly many lines later. If you want to put multiple commands on a single line the way to do it is to separate them by ";"'s and not hit enter until complete.

Still you can put the command in several lines as well by pur "enter".
That's why in the second line, the ">" becomes "+"....

thank you for your reply though.

You and JesperHybel would both be following recommended list behavior if you would both start copying the questions or response to which you are replying. It is acceptable practice to trim the questions but it is poor form to post naked replies without any context.

View this message in context: 
http://r.789695.n4.nabble.com/How-to-perform-a-substitution-in-a-loop-tp2325048p2325075.html
--

David Winsemius, MD
West Hartford, CT

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to