[R] glm pairwise interaction coefficients

2009-10-08 Thread Josh Roofchop
I am trying to recreate the analysis of the recent Kirwan et al paper in Ecology [9(80), 2032-2032]. The SAS code is available but am having troubles getting the R equivalents. The SAS code is: *Model 5 - Species-specific interaction coefficients; PROC GLM; where N=150; MODEL YIELD=G1 G2

Re: [R] Combine colors and shading lines

2008-06-20 Thread Josh Roofchop
1,2), sum) ) > a1<-a[1:2,] > > barplot(a1, > type="n", > > col=c("red","red","blue","blue","purple","purple","green","green"), > beside = TRUE ) > > barplot(a1

[R] Combine colors and shading lines

2008-06-20 Thread Josh Roofchop
Hi, basically I am trying to create a grouped bar graph with each group a different color and a bar in each group to have shading lines. Basically combine the 2 graphs created below. Thanks, Josh data(HairEyeColor) a <- as.table( apply(HairEyeColor, c(1,2), sum) ) a1<-a[1:2,] par(mfcol=c(1,2),

Re: [R] Re move a number from a vector

2008-03-18 Thread Josh Roofchop
Thanks to both John and Arthur for their replies, they both worked great. Josh Josh Roofchop wrote: > > This should be an easy one, but I haven't been able to figure it out, > > x<-c(2, 4, 6, 9, 10) > #how do I remove a single value > x<-x[-2] # will remove the

[R] Re move a number from a vector

2008-03-18 Thread Josh Roofchop
This should be an easy one, but I haven't been able to figure it out, x<-c(2, 4, 6, 9, 10) #how do I remove a single value x<-x[-2] # will remove the second element of the vector not the number 2 This is part of a loop that looks a little like this... x<-c(2, 4, 6, 9, 10) remove.value<-4 #the