: r-help@r-project.org
Subject: Re: [R] bind select data frames
Hi Arnaud,
Try the following (untested):
txt <- paste('DailyPL',c("100419", "100420", "100421"), sep = "")
do.call(rbind, lapply(txt, get))
HTH,
Jorge
On Wed, Jun 2, 2010 at 10
:11 PM
> To: arnaud Gaboury
> Cc: r-help@r-project.org
> Subject: Re: [R] bind select data frames
>
> On Wed, Jun 2, 2010 at 8:06 AM, arnaud Gaboury
> wrote:
> > I am working with something like this :
> >
> > for (i in sel[-1]) {
> > dd<-data.frame
> To: arnaud Gaboury
> Cc: r-help@r-project.org
> Subject: Re: [R] bind select data frames
>
> This should do the trick:
>
> dd <- do.call(rbind, mget(paste("DailyPL",sel[-1], sep=""),
> envir=.GlobalEnv))
>
>
>
> On Wed, Jun 2, 2010 a
of 100419..., as I need to be able to change these numbers.
> TY for your help
>
>
>
>
> From: Jorge Ivan Velez [mailto:]
> Sent: Wednesday, June 02, 2010 5:09 PM
> To: arnaud Gaboury
> Cc: r-help@r-project.org
> Subject: Re: [R] bind select data frames
>
> Hi Arna
I included the old data in
the rbind, otherwise it is just overwritten everytime it loops.
Josh
>
>
>
>
>> -Original Message-
>> From: Joshua Wiley [mailto:jwiley.ps...@gmail.com]
>> Sent: Wednesday, June 02, 2010 4:48 PM
>> To: arnaud Gaboury
>> Cc: r-help@r-project.org
Hi Arnaud,
Try the following (untested):
txt <- paste('DailyPL',c("100419", "100420", "100421"), sep = "")
do.call(rbind, lapply(txt, get))
HTH,
Jorge
On Wed, Jun 2, 2010 at 10:24 AM, arnaud Gaboury <> wrote:
> Dear group,
>
> Here is my environment:
>
> > ls()
> [1] "DailyPL100419" "DailyPL
>
>
>
>
>> -Original Message-
>> From: Joshua Wiley [mailto:jwiley.ps...@gmail.com]
>> Sent: Wednesday, June 02, 2010 4:48 PM
>> To: arnaud Gaboury
>> Cc: r-help@r-project.org
>> Subject: Re: [R] bind select data frames
>>
&
;, "100421"),
"dd" is only equal to "DailyPL100421"
> -Original Message-
> From: Joshua Wiley [mailto:jwiley.ps...@gmail.com]
> Sent: Wednesday, June 02, 2010 4:48 PM
> To: arnaud Gaboury
> Cc: r-help@r-project.org
> Subject: Re
lyPL100421)
> -Original Message-
> From: Joshua Wiley [mailto:jwiley.ps...@gmail.com]
> Sent: Wednesday, June 02, 2010 4:48 PM
> To: arnaud Gaboury
> Cc: r-help@r-project.org
> Subject: Re: [R] bind select data frames
>
> Hello,
>
> Does this do what you are look
Hello,
Does this do what you are looking for?
output <- NULL
for(i in paste("DailyPL", sel, sep="")[-1]){
output <- rbind(output, get(i))
}
If you just want to rbind all the data frames, there are ways of doing
it without a loop too, but since you specifically asked
10 matches
Mail list logo