Re: [R] A list of data frames and a list of colnames.

2017-10-23 Thread Bert Gunter
This doesn't make sense to me: On Mon, Oct 23, 2017 at 2:09 PM, Ed Siefker wrote: > I have a list of file names, and a list of data frames contained in those > files. > > mynames <- list.files() > ## a character vector of file names mydata <- lapply(mynames, read.delim) > # A list of data fra

Re: [R] A list of data frames and a list of colnames.

2017-10-23 Thread Rui Barradas
Hello, I think that your code is simple enough to be considered "nice". If you are worried about the for loop, don't, were loops worrying they wouldn't exist. Hope this helps, Rui Barradas Em 23-10-2017 22:09, Ed Siefker escreveu: I have a list of file names, and a list of data frames cont

[R] A list of data frames and a list of colnames.

2017-10-23 Thread Ed Siefker
I have a list of file names, and a list of data frames contained in those files. mynames <- list.files() mydata <- lapply(mynames, read.delim) Every file contains two columns. > colnames(mydata[[1]]) [1] "Name" "NumReads" > colnames(mydata[[2]]) [1] "Name" "NumReads" I can set the colna