search for: lst4

Displaying 6 results from an estimated 6 matches for "lst4".

Did you mean: lst
2013 Jun 04
0
choose the lines2
...ot;\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<- lapply(seq_along(lst4),function(i){ ??? ??? ??? ??? ???? do.call(rbind,lapply(which(lst4[[i]]$evnmt_brutal==1),function(x) { ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? x1<-c(x-2,x-1,x) ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? x2<-x1[!any(x1==0)] ??? ?...
2013 Jun 08
0
data
...t1New[lapply(lst1New,nrow)>0] ??? lst3<- lapply(lst2,function(x){ ??? ??? ??? ??? lapply(x$dimension,function(y){ ??? ??? ??? ??? ? x1<- x[(y < (x$dimension+(x$dimension*percent))) & (y > (x$dimension-(x$dimension*percent))),]??? ??? ??? ??? ??? ??? })??? ??? ??? ??? ??? }) ??? lst4<- lapply(lst3,function(x){ ??? ??? ??? ???? ?? lst<- lapply(x,function(y){ ??? ??? ??? ??? ??? ??? ??? y[!all(y$dummy==0),] ??? ??? ??? ??? ??? ??? ??? ???? }) ??? ??? ??? ??? ?? lstNew<- lst[lapply(lst,nrow)>1] ??? ??? ??? ??? ?? lstNew1<- unique(lstNew) ??? ??? ??? ??? ?? }) ??????...
2013 Jun 04
0
choose the lines2
...ot;\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<- lapply(seq_along(lst4),function(i){ ???????????????????? do.call(rbind,lapply(which(lst4[[i]]$evnmt_brutal==1),function(x) { ??????????????????????????????????????? x1<-c(x-2,x-1,x) ??????????????????????????????????????? x2<-x1[!any(x1==0)] ?????...
2013 Jun 07
4
matched samples, dataframe, panel data
I R-helpers #I have a data panel of thousands of firms, by year and industry and #one dummy variable that separates the firms in two categories: 1 if the firm have an auditor; 0 if not #and another variable the represents the firm dimension (total assets in thousand of euros) #I need to create two separated samples with the same number os firms where #one firm in the first have a corresponding
2013 May 27
0
choose the lines
...t;\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() ??? ??? ??? ??? for(line in which(x$evnmt_brutal==1)){ ??? ??? ??? ??? ?? if(x$evnmt_brutal[line-1]==0){ ??? ??? ??? ??? ? vect.brutal=c(vect.brutal,line) ??? ??? ??? ??? ??? } ??? ??? ??? ??? ??? ?? } ??? ??? ??? ????? vect.brutal1<- sort(c(vect.brut...
2013 Jun 30
0
Help: argument is not numeric or logical: returning NA
...gt;300 & V6<3000,select="V6")) #[1]] #[1] V6 #<0 rows> (or 0-length row.names) # #[[2]] #[1] V6 #<0 rows> (or 0-length row.names) # #[[3]] #[1] V6 #<0 rows> (or 0-length row.names) --------------------------------------------- #changed the V1 column ?set.seed(24) lst4<- lapply(lst3,function(x) {x$V1<- sample(c(0,3,6),nrow(x),replace=TRUE);x}) #I am skipping the first 2, ie. 'id' and 'iat.date' as the filenames were not provided. res<-t(sapply(lst4,function(x) {block4<-x[with(x,V1==3 & V6>300 & V6<3000),"V6"]...