Displaying 2 results from an estimated 2 matches for "cg232".
2011 Nov 15
1
averaging between rows with repeated data
*The situation (or an example at least!)*
example<-data.frame(rep(letters[1:10]))
colnames(example)[1]<-("Letters")
example$numb1<-rnorm(10,1,1)
example$numb2<-rnorm(10,1,1)
example$numb3<-rnorm(10,1,1)
example$id<-c("CG234","CG232","CG441","CG128","CG125","CG182","CG232","CG441","CG232","CG125")
*this produces something like this:*
Letters numb1 numb2 numb3 id
1 a 0.8139130 -0.9775570 -0.002996244 CG234
2...
2011 Nov 16
3
create list of names where two df contain == values
...duce a list of the 9 letters where the two criteria columns
matched (a,b,c,d,e,f,g,i,j):
df.1<-data.frame(rep(letters[1:10]))
colnames(df.1)[1]<-("Letters")
set.seed(1)
df.1$numb1<-rnorm(10,1,1)
df.1$extra.col<-c(1,2,3,4,5,6,7,8,9,10)
df.1$id<-c("CG234","CG232","CG441","CG128","CG125","CG182","CG982","CG541","CG282","CG154")
df.1
df.2<-data.frame(rep(letters[1:10]))
colnames(df.2)[1]<-("Letters")
set.seed(1)
df.2$extra.col<-c(1,2,3,4,5,6,7,8,9,10)
df....