Displaying 2 results from an estimated 2 matches for "data2003".
2004 Nov 04
3
calling a var by name in another var
Hello list,
I'd like to use a variable (or a column of a data frame) by using its name as a
string. E.g.:
Data2003 <- c(150,200,120)
Data2004 <- c(145,211,110)
myvar1 <- "Data2003"
myvar2 <- "Data2004"
# now I'd like do do this
total <- Data2003 + Data2004
# in any way like
# total <- ???(myvar1, myvar2)
# or
# total <- ???(myvar1) + ???(myvar2)
# or something li...
2004 Oct 22
3
dotplot & lattice problems: y axis values and bg color output in jpg
...another
lattice plot in the same session, the colors change to the dark
background, and I suppose the same trouble is happening. Isn't
trellis.par.set() going to remain in place for all following trellis plots?
Here's the code I used to make these 2 graphs.
x11(height=6.5,width=6.5)
data2003<- subset(elaine1,POLCYEAR==2003)
plot(data2003$OLDCRASH,data2003$RENUCYC)
modall <- lm(RENUCYC~OLDCRASH,data=data2003)
abline(modall)
dev.copy(device=jpeg,file="plotTrouble1.jpg")
dev.off()
dev.off()
trellis.par.set(theme=col.whitebg(),height=9,width=6.5)
dotplot (RENUCYC~OLDCRAS...