[R] vector w/o arithmetic addition for boxplot
rl269
rlisi at acad.umass.edu
Tue May 15 23:47:39 CEST 2012
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))
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.
More information about the R-help
mailing list