Giles Bischoff
2016-Jul-10 05:59 UTC
[R] Reading a large directory of compressed zips into a data frame
Hello R Programmers! I was wondering if y'all could help me. I'm trying to read data from a directory containing 332 compressed zips all with about 1000 lines (or more) of data into a data frame. I have it so that the directory is set to the file with the zips in it. I figured this way when I tried using the dir() function, I could do something like d1 <- read.csv(dir()[1:332]) to read all the data and then find the mean of say "columnA" in that data table by using something like mean(d1$columnA). Though, so far this has not worked. Any ideas? Sincerely, Giles [[alternative HTML version deleted]]
David Winsemius
2016-Jul-10 06:20 UTC
[R] Reading a large directory of compressed zips into a data frame
> On Jul 9, 2016, at 10:59 PM, Giles Bischoff <gab4 at st-andrews.ac.uk> wrote: > > Hello R Programmers! > I was wondering if y'all could help me. I'm trying to read data from a > directory containing 332 compressed zips all with about 1000 lines (or > more) of data into a data frame. I have it so that the directory is set to > the file with the zips in it. I figured this way when I tried using the > dir() function, I could do something like d1 <- read.csv(dir()[1:332]) to > read all the data and then find the mean of say "columnA" in that data > table by using something like mean(d1$columnA). Though, so far this has not > worked. Any ideas?This is highly likely to be one of the homework problems for one of Peng's Johns Hopkins online data management courses. Questions from htat course have been posted many times on StackOverflow and many of them have been answered there as well. R-help, however, has a no homework policy.> Sincerely, > Giles > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.David Winsemius Alameda, CA, USA