Re: [R] matched samples, dataframe, panel data

2013-06-16 Thread arun
Hi, This gives me more combinations than you got with SAS.  Also, this selects the one with minimum dimension between duplicates. final3New<-read.table(file="real_data_cecilia.txt",sep="\t",header=T) final3New1<-read.csv("real_data_cecilia_new.csv") fun3<- function(dat){         if(any(duplicat

Re: [R] matched samples, dataframe, panel data

2013-06-14 Thread arun
Hi, I changed the fun1().  Now, it should be possible to get all the possible combinations within each group. final3New<-read.table(file="real_data_cecilia.txt",sep="\t",header=T) final3New1<-read.csv("real_data_cecilia_new.csv") fun1New<- function(dat,percent,number){     lst1<- split(dat,list(

Re: [R] matched samples, dataframe, panel data

2013-06-07 Thread arun
t;0]}) res2<-do.call(rbind,lapply(lst7,function(x) do.call(rbind,x)))  identical(res1,res2) #[1] TRUE A.K. - Original Message - From: Cecilia Carmo To: arun Cc: R help Sent: Friday, June 7, 2013 6:10 PM Subject: RE: [R] matched samples, dataframe, panel data Maybe the final result is

Re: [R] matched samples, dataframe, panel data

2013-06-07 Thread Cecilia Carmo
20 1 2789 A.K. - Original Message - From: Cecilia Carmo To: R help Cc: arun Sent: Friday, June 7, 2013 5:51 PM Subject: RE: [R] matched samples, dataframe, panel data Thank you very much. I apologize but I want to ask only one more thing: How to do if I want i

Re: [R] matched samples, dataframe, panel data

2013-06-07 Thread arun
.K. - Original Message - From: Cecilia Carmo To: R help Cc: arun Sent: Friday, June 7, 2013 5:51 PM Subject: RE: [R] matched samples, dataframe, panel data Thank you very much. I apologize but I want to ask only one more thing: How to do if I want in addition to impose that the diffenc

Re: [R] matched samples, dataframe, panel data

2013-06-07 Thread Cecilia Carmo
nho de 2013 17:30 Para: Cecilia Carmo Cc: R help Assunto: Re: [R] matched samples, dataframe, panel data Sorry, it included a case with both values for dummy were 1. lst7<-lapply(lst6,function(x) {lst<-lapply(x,function(y) y[sum(y$dummy)==1,]);lst[lapply(lst,nrow)>0]}) res<-do

Re: [R] matched samples, dataframe, panel data

2013-06-07 Thread arun
my==0)) #[1] 22  nrow(subset(res,dummy==1)) #[1] 22 A.K. - Original Message - From: Cecilia Carmo To: arun Cc: R help Sent: Friday, June 7, 2013 12:03 PM Subject: RE: [R] matched samples, dataframe, panel data Sorry, Something is not ok, because when  I do > nrow(subset(res,res

Re: [R] matched samples, dataframe, panel data

2013-06-07 Thread Cecilia Carmo
oo.com] Enviado: sexta-feira, 7 de Junho de 2013 16:43 Para: Cecilia Carmo Cc: R help Assunto: Re: [R] 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

Re: [R] matched samples, dataframe, panel data

2013-06-07 Thread Cecilia Carmo
That's it, the first one! Thank you very much, Cecília Carmo De: arun [smartpink...@yahoo.com] Enviado: sexta-feira, 7 de Junho de 2013 16:43 Para: Cecilia Carmo Cc: R help Assunto: Re: [R] matched samples, dataframe, panel data Hi, Not sure if th

Re: [R] matched samples, dataframe, panel data

2013-06-07 Thread arun
To: arun 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 De: arun [smartpink...@yahoo.com] Enviado: sexta-f

Re: [R] matched samples, dataframe, panel data

2013-06-07 Thread arun
sion #16    4 2000   20 0  3178 #31    7 2000   20 1  3245 # #$`2000.20`[[3]]  #  firm year industry dummy dimension #11    3 2000   20 1  4532 #6 2 2000   20 0  4890 A.K. ________________ From: Cecilia Carmo To: "r-help@r-projec

Re: [R] matched samples, dataframe, panel data

2013-06-07 Thread Cecilia Carmo
Again my problem, better explained. #I have a data panel of thousands of firms, by year and industry and #one dummy variable that identifies one kind of firms (1 if the firm have an auditor; 0 if not) #and another variable the represents the firm dimension (total assets in thousand of euros) #

[R] matched samples, dataframe, panel data

2013-06-07 Thread Cecilia Carmo
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 creat