Created
February 14, 2013 20:40
-
-
Save nassimhaddad/4956206 to your computer and use it in GitHub Desktop.
load all .cdv files in /data folder.
source: http://www.johnmyleswhite.com/notebook/2010/09/19/why-use-projecttemplate-or-any-other-framework/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data.files <- dir('data') | |
for (data.file in data.files) | |
{ | |
filename <- file.path('data', data.file) | |
variable.name <- sub('\\.csv$', '', data.file, ignore.case = TRUE, perl = TRUE) | |
assign(variable.name, read.csv(filename, header = TRUE, sep = ',')) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment