[R] Minor warning about seq

Dieter Menne dieter.menne at menne-biomed.de
Wed Dec 1 09:14:17 CET 2010



Prof. John C Nash wrote:
> 
> I spent more time than I should have debugging a script because I wanted
>    x<-seq(0,100)*0.1
> 
> but typed
>    x<-seq(O:100)*0.1
> 
> seq(0:100) yields 1 to 101,
> 

Which leads us to another rule: never use a variable called "O". I remember
this was a no-no even in my first Algol-course in 1967.

In a virginal Rgui:

> x<-seq(O:100)*0.1 
Error in seq(O:100) : object 'O' not found
 
Dieter

-- 
View this message in context: http://r.789695.n4.nabble.com/Minor-warning-about-seq-tp3065964p3066791.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list