[R] Shouldn't this be fixed in the documentation? No.

David Winsemius dwinsemius at comcast.net
Tue Apr 26 01:18:15 CEST 2011


csmark wrote:
> 
> I know I'm bringing up an old thread but I ran into this exact same
> problem.  It comes straight out of section 3.3 "Getting & Setting
> Attributes" from "An Introduction to R" documentation.
> 
> 
> http://cran.r-project.org/doc/manuals/R-intro.html#Getting-and-setting-attributes
> http://cran.r-project.org/doc/manuals/R-intro.html#Getting-and-setting-attributes 
> 
> Earlier in section 3.1 it has "if z is a complex vector of length 100,
> then in an expression mode(z) is the character string "complex" and
> length(z) is 100."
> 
> The very next assignment is z <- 0:9.  
> 
> If one makes a complex array of length 100 via z <- c(1+0i:99+0i) the
> attr() function works perfectly.
> 
> Not being fluent in complex numbers I don't quite know how the range
> (1+0i:100+0i) has 101 elements but maybe this could be added too.
> 
> Who do we contact to clarify this?  Thanks!
> 

First, hit your forehead ... hard, then repeat ten times: "operator
precedence"

Then go read the FAQ item about this or go to:
> ?Syntax

 ..... so you can see what efforts have already been made "to clarify this".
-- 
Daid/

--
View this message in context: http://r.789695.n4.nabble.com/setting-attributes-tp3028152p3474356.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list