On 21/09/2007 4:20 PM, Evan Cooch wrote:
> Paul Hiemstra wrote:
>> Hi,
>>
>> This works:
>>
>> for(i in seq(1,100,5)) {
>> print(i)
>> }
>>
>> Very similar to the way python does this kind of loop.
>>
> 
> Indeed it is - thanks for the tip. I'm still puzzled why I can't find a 
> single piece of the standard [R] language documentation that shows this. 
> In contrast, every single other language I use (more than I care to 
> admit), and documentation for same, feature this prominently when they 
> talk about looping.

It's in "9.2.2 Repetitive execution: for loops, repeat and while" of the 
Introduction to R manual. That's a good manual to read if you're looking 
for an introduction to R.

Duncan Murdoch

______________________________________________
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