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

From: David Winsemius <dwinsemius_at_comcast.net>
Date: Mon, 25 Apr 2011 16:18:15 -0700 (PDT)

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.

______________________________________________
R-help_at_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.
Received on Mon 25 Apr 2011 - 23:24:23 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 26 Apr 2011 - 00:10:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive