Re: [R] loop with files

2008-06-25 Thread Monica Pisica
Message: 4 Date: Tue, 24 Jun 2008 12:37:44 +0200 From: Wacek Kusnierczyk Subject: Re: [R] loop with files To: R help Message-ID: Content-Type: text/plain; charset=ISO-8859-1 Alfredo Alessandrini wrote: >> can you *explain* what the goal is? >> > > I want import any rwl f

Re: [R] loop with files

2008-06-24 Thread Wacek Kusnierczyk
Alfredo Alessandrini wrote: >> can you *explain* what the goal is? >> > > I want import any rwl files (cimfasy.rwl, rocquce.rwl, ...), in a > data.frame with the name like to name of file rwl: > > cimfasy.rwl -> cimfasy > > rocquce.rwl -> rocquce > > with this loop: > > >> library(dplR

Re: [R] loop with files

2008-06-24 Thread Wacek Kusnierczyk
Alfredo Alessandrini wrote: > I'm trying to make a loop with many files... > > > >> library(dplR) >> >> files <- system("ls *.rwl", intern=TRUE) >> >> files >> > [1] "cimfasy.rwl" "rocquce.rwl" > >> for (i in files) {a <- read.rwl(i,header=0)} >> > There are 70 series > There are 21

[R] loop with files

2008-06-24 Thread Alfredo Alessandrini
I'm trying to make a loop with many files... > library(dplR) > > files <- system("ls *.rwl", intern=TRUE) > > files [1] "cimfasy.rwl" "rocquce.rwl" > for (i in files) {a <- read.rwl(i,header=0)} There are 70 series There are 21 series > class(a) [1] "data.frame" This loop import all the files r