[R] vector w/o arithmetic addition for boxplot
Uwe Ligges
ligges at statistik.tu-dortmund.de
Wed May 16 17:37:33 CEST 2012
On 15.05.2012 23:47, rl269 wrote:
> Hello,
>
> I am having trouble asking R to read individual numeric vectors for a box
> plot of the residuals of a linear regression. It is performing arithmetic
> addition on the 16 individual variables that I want individual box plots
> for.
>
> I have 16 race*treatment variables that were created from cleaned
> data.frames for race and treatment independently: t1W, t1B.....t4W, t4B,
> t4H, t4O.
>
> class(t1W) produces "numeric" (1000 observations of 1's and 0's)
>
> To create the box plot I am using
> boxplot(residuals(IRR)~ treatRace_clean)
>
> where I have tried treatRace_clean as both of the following
> treatRace_clean<- as.factor(as.vector(t1W + t1B + t1H + t1O + t2W + t2B +
> t2H + t2O + t3W + t3B +
> t3H + t3O + t4W + t4B + t4H + t4O))
> treatRace_clean<- as.vector(c(t1W, t1B ,t1H ,t1O, t2W , t2B ,t2H ,t2O ,t3W
> , t3B,
> t3H + t3O , t4W , t4B , t4H , t4O))
Actually, I have no idea what you are really aiming at, reproducible
code and a precise description would help a lot.
Uwe Ligges
> However, I continue to get this error code:
> Error: $ operator is invalid for atomic vectors
>
> Thoughts?
>
> --
> View this message in context: http://r.789695.n4.nabble.com/vector-w-o-arithmetic-addition-for-boxplot-tp4630190.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.
More information about the R-help
mailing list