Which can be simplified to:
paths <- dir(path = filePath, pattern = "^test_", full = T)
lapply(paths, read.csv)
Hadley
On Tue, Nov 11, 2008 at 2:01 PM, <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Thanks everyone for your advice. They have been helpful.
>
> Just for the record, I am using ...
>
> l
Hi all,
Thanks everyone for your advice. They have been helpful.
Just for the record, I am using ...
lapply(dir(path = filePath, pattern = "^test_"), function(x){read.table(file
= paste(filePath, x, sep = ""), sep = ",", header = TRUE) } )
to load the files
kind regards
Chibisi
On Tue, Nov
gmail.com> writes:
> I am trying to read a bunch of csv files using read.table() that are named
> "test_xx.csv" where "xx" has no particular pattern. Is there a way
> of reading all the files by specifying a truncated file name e.g. "test_"
> with some wild card characters, or would I ha
Try this:
sapply(dir(patt="^test_"), read.table, sep = ";", header = TRUE)
On Tue, Nov 11, 2008 at 3:06 PM, <[EMAIL PROTECTED]> wrote:
> Dear all,
>
> I am trying to read a bunch of csv files using read.table() that are named
> "test_xx.csv" where "xx" has no particular pattern. Is there
?dir
Hadley
On Tue, Nov 11, 2008 at 11:06 AM, <[EMAIL PROTECTED]> wrote:
> Dear all,
>
> I am trying to read a bunch of csv files using read.table() that are named
> "test_xx.csv" where "xx" has no particular pattern. Is there a way
> of reading all the files by specifying a truncated fi
5 matches
Mail list logo