Displaying 2 results from an estimated 2 matches for "calpas".
Did you mean:
callas
2010 Jan 28
2
Data.frame manipulation
...reduced # of rows. I am particularly
interested in
simply reducing the additional variables in the data.frame to the first row
of the
corresponding id variable. For example:
id<-c(1,2,2,3,3,3)
es<-c(.3,.1,.3,.1,.2,.3)
mod1<-c(2,4,4,1,1,1)
mod2<-c("wai","other","calpas","wai","itas","other")
data<-as.data.frame(cbind(id,es,mod1,mod2))
data
id es mod1 mod2
1 1 0.3 2 wai
2 2 0.1 4 other
3 2 0.2 4 calpas
4 3 0.1 1 itas
5 3 0.2 1 wai
6 3 0.3 1 wai
# I would li...
2009 Oct 04
2
Row to Column help
...ta. For example:
id<-c(1,2,2,3,3,3)
author<-c("j","k","k","l","l","l")
tmt<-c("cbt","act","dbt","act","act","cbt")
alliance<-c("wai","other","calpas","wai","itas","other")
data<-as.data.frame(cbind(id,author,tmt,alliance))
> data
id author tmt alliance
1 1 j cbt wai
2 2 k act other
3 2 k dbt calpas
4 3 l act wai
5 3 l act itas
6 3 l...