Re: [R] Reading multiple csv files with a for loop

2013-06-17 Thread Rui Barradas
Hello, You are reading 11 times the same file, 'toread'. Assuming that 'toread' is a vector with 11 different filenames in it, something like the following might do what you want. for ( i in 1:11) myfiles[i] <- read.csv(toread[i], header = TRUE, sep=") AS for the final "for loop", it does not

[R] Reading multiple csv files with a for loop

2013-06-17 Thread Dzu
Dear R-help users, I am quite new in R. I have multiple csv.files with different size. I would like to read them by using a for- loop and parallel by reading I need to add a new column which can be specified by myself. But my for-loop does not work ! Could somebody give me any idea ? Many thanks!

Re: [R] Reading multiple .csv-files and assigning them to variable names

2010-10-29 Thread Gabor Grothendieck
On Fri, Oct 29, 2010 at 5:16 AM, Sarah Moens wrote: > Hi all, > > I've been trying to find a solution for the problem of reading > multiple files and storing them in a variable that contains the names > by which I want to call the datasets later on. > > For example (5 filenames): > > - The filenam

Re: [R] Reading multiple .csv-files and assigning them to variable names

2010-10-29 Thread jim holtman
Read them into a list; much easier to handle: myList <- lapply(filenames, read.csv) On Fri, Oct 29, 2010 at 5:16 AM, Sarah Moens wrote: > Hi all, > > I've been trying to find a solution for the problem of reading > multiple files and storing them in a variable that contains the names > by which

[R] Reading multiple .csv-files and assigning them to variable names

2010-10-29 Thread Sarah Moens
Hi all, I've been trying to find a solution for the problem of reading multiple files and storing them in a variable that contains the names by which I want to call the datasets later on. For example (5 filenames): - The filenames are stored in one variable: filenames = paste(paste('name', '_',

Re: [R] Reading multiple csv files

2010-02-26 Thread Patrick Connolly
On Fri, 26-Feb-2010 at 12:15AM -0800, Madhavi Bhave wrote: |> Dear R helpers |> ? |> Some particular analysis leads me to various number of output csv |> files depending on some conditions. Say e.g. I have output files |> variable1.csv, variable2.csv, .. Problem is I don't |> know how

[R] Reading multiple csv files

2010-02-26 Thread Madhavi Bhave
Dear R helpers   Some particular analysis leads me to various number of output csv files depending on some conditions. Say e.g. I have output files variable1.csv, variable2.csv, .. Problem is I don't know how many csv files been generated. They could be 4, 5 or even 10. Each file wil