Skip to content
Prev 324938 / 398503 Next

matched samples, dataframe, panel data

Hi,
Not sure if this is what you wanted.

?res<-do.call(rbind,lapply(lst6,function(x) do.call(rbind,x)))
?row.names(res)<-1:nrow(res)

# this combines the list of lists to a data.frame
res[1:4,]
#? firm year industry dummy dimension
#1??? 1 2000?????? 20???? 0????? 2120
#2??? 5 2000?????? 20???? 1????? 2189
#3??? 4 2000?????? 20???? 0????? 3178
#4??? 7 2000?????? 20???? 1????? 3245


#or
?res<-do.call(rbind,lapply(lst6,function(x) do.call(rbind,x)))
?res$group<-gsub("(.*\\..*)\\..*$","\\1",rownames(res))
?row.names(res)<-1:nrow(res)
?res[1:4,]
#? firm year industry dummy dimension?? group
#1??? 1 2000?????? 20???? 0????? 2120 2000.20?? #1 group
#2??? 5 2000?????? 20???? 1????? 2189 2000.20?? #1
#3??? 4 2000?????? 20???? 0????? 3178 2000.20?? #2
#4??? 7 2000?????? 20???? 1????? 3245 2000.20?? #2
A.K.


----- Original Message -----
From: Cecilia Carmo <cecilia.carmo at ua.pt>
To: arun <smartpink111 at yahoo.com>
Cc: 
Sent: Friday, June 7, 2013 11:33 AM
Subject: RE: [R] matched samples, dataframe, panel data

Thank you very much. 
Just a little thing: how can I put it like a dataframe?

Thanks,

Cec?lia