[R] for loop to list files

2014-04-21 Thread Beatriz R. Gonzalez Dominguez
Dear all, I'm trying to create a loop to select a series of files into my computer but I haven't been successful until now. I've looked into different possibilities but none has worked. I'd appretiate if you could help me by providing me with some ideas. Basically what I'd like to do is to

Re: [R] for loop to list files

2014-04-21 Thread Jorge I Velez
Hi Beatriz, Try paste(val_mapped_petpe_, 1976:1981, 01.txt, sep=) Best, Jorge.- On Mon, Apr 21, 2014 at 6:43 PM, Beatriz R. Gonzalez Dominguez aguitatie...@hotmail.com wrote: Dear all, I'm trying to create a loop to select a series of files into my computer but I haven't been successful

Re: [R] for loop to list files

2014-04-21 Thread Beatriz R. Gonzalez Dominguez
Hi Jorge, Thanks so much! Exactly what I wanted. Finally I wrote: for(i in 1976:1981){ PE.files_01_7681 - paste(val_mapped_petpe_, 1976:i, 01.txt, sep=) } Cheers, Bea On 21/04/2014 10:46, Jorge I Velez wrote: Hi Beatriz, Try paste(val_mapped_petpe_, 1976:1981, 01.txt, sep=) Best,

Re: [R] for loop to list files

2014-04-21 Thread Jeff Newmiller
You seem overly intent on getting a for loop into your code. Jorge's solution has the same effect as your for loop. --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.us