Re: [R] Simple question about symbols()

From: Ben Bolker <bbolker_at_gmail.com>
Date: Wed, 20 Apr 2011 12:57:10 +0000

David Winsemius <dwinsemius <at> comcast.net> writes:

>
>
> On Apr 19, 2011, at 10:51 PM, murilofm wrote:
>
> > Thanks for the answer; I see that col=c("blue","red")[inv$c+1]
> > creates a
> > vector of "red" and "blue" associated with the binnary c.
> > But still I got everything red.
>
> If you want tested solution, submit test data.
>

  David also suggests (off-lists) that you use "bg" instead of "col" as the argument name. (Another strategy is to go to ?symbols and search for "colour" -- I wouldn't expect a new user to guess the c("blue","red")[inv$c+1] stuff, but you probably could go to the help page and figure out that the appropriate argument name is "bg" ...)



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 Wed 20 Apr 2011 - 13:33:16 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 Wed 20 Apr 2011 - 13:40:31 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