Created
February 11, 2017 16:55
-
-
Save thomas-kassel/97fda845324d7c81b82af1c0659d34aa to your computer and use it in GitHub Desktop.
Import of NHANES data tables
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
setwd('./tables') | |
# Loop through directory with all input tables as CSV's | |
# Save as dataframes in R environment for shiny use | |
for (i in 1:length(dir())){ | |
tablename <- unlist(strsplit(dir()[i],'.csv'))[1] | |
table <- read.csv(dir()[i],stringsAsFactors = F,colClasses = c(seqID='character')) | |
assign(tablename,table) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment