Displaying 3 results from an estimated 3 matches for "xjqian".
2010 Mar 14
2
code rows depending on the value of other rows in multilevel dataframe
I have a multilevel dataframe (df):
ID Date Segment Slice Tract Lesion
1 CSPP005 12/4/2007 1 1 LCST 0
2 CSPP005 12/4/2007 1 1 LPC 2
3 CSPP005 12/4/2007 1 1 RPC 3
4 CSPP005 12/4/2007 1 1 RCST 1
5 CSPP005 12/4/2007 1 1 LGM 0
6 CSPP005 12/4/2007 1 1
2009 Jul 25
1
regex expression to select row or column
I have a multidimensional data which looks like the following:
"S1-a" "S2-b" "S3-c" "S4-d" "S5-a" "S6-b" "S7-c" "S8-d"
"T1-A"
"T1-B"
"T1-C"
"T1-D"
"T2-A"
"T2-B"
"T2-C"
"T2-D"
I read it from csv file and would like to have 16
2011 Apr 25
1
average among one factor in a nested dataframe
I have two nested data frames:
a<-rnorm(6)
b<-rnorm(9)
f1<-c("x1","x2","x3"))
f2<-c("y1","y2")
id<-c(1:6)
a_df<-data.frame(cbind(id,f1,"y1",a))
id<-c(1:9)
b_df<-data.frame(cbind(id,f1,"y2",b))
I want to preserve id and f1, but want to collapse f2 and take the
corresponding mean values of a and b.