Displaying 3 results from an estimated 3 matches for "evnmt_brut".
Did you mean:
evnmt_brutal
2013 Jun 04
0
choose the lines2
Hi,
May be this helps:
dat1<- read.csv("dat7.csv",header=TRUE,stringsAsFactors=FALSE,sep="\t")
dat.bru<- dat1[!is.na(dat1$evnmt_brutal),]
fun2<- function(dat){??
????? lst1<- split(dat,dat$patient_id)
??? lst2<- lapply(lst1,function(x) x[cumsum(x$evnmt_brutal==0)>0,])
??? lst3<- lapply(lst2,function(x) x[!(all(x$evnmt_brutal==1)|all(x$evnmt_brutal==0)),])
??? lst4<- lst3[lapply(lst3,nrow)!=0]
??? lst5<- la...
2013 Jun 04
0
choose the lines2
HI,
You can do this:
dat1<- read.csv("dat7.csv",header=TRUE,stringsAsFactors=FALSE,sep="\t")
dat.bru<- dat1[!is.na(dat1$evnmt_brutal),]
fun2<- function(dat){?
????? lst1<- split(dat,dat$patient_id)
??? lst2<- lapply(lst1,function(x) x[cumsum(x$evnmt_brutal==0)>0,])
??? lst3<- lapply(lst2,function(x) x[!(all(x$evnmt_brutal==1)|all(x$evnmt_brutal==0)),])
??? lst4<- lst3[lapply(lst3,nrow)!=0]
??? lst5<- la...
2013 May 27
0
choose the lines
Hi,
Try this:
dat1<- read.csv("dat7.csv",header=TRUE,stringsAsFactors=FALSE,sep="\t")
dat.bru<- dat1[!is.na(dat1$evnmt_brutal),]
fun1<- function(dat){???
? ??? lst1<- split(dat,dat$patient_id)
??? lst2<- lapply(lst1,function(x) x[cumsum(x$evnmt_brutal==0)>0,])
??? lst3<- lapply(lst2,function(x) x[!(all(x$evnmt_brutal==1)|all(x$evnmt_brutal==0)),])
??? lst4<-lapply(lst3,function(x) {vect.brutal=c()
??...