[R] Simple question about symbols()

Ben Bolker bbolker at gmail.com
Wed Apr 20 14:57:10 CEST 2011


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" ...)



More information about the R-help mailing list