Skip to content

Instantly share code, notes, and snippets.

@ttal1
Created November 13, 2015 01:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ttal1/81c5fe7a6c32efa2f3c4 to your computer and use it in GitHub Desktop.
Save ttal1/81c5fe7a6c32efa2f3c4 to your computer and use it in GitHub Desktop.
complete practice
complete <- function(directory, id = 1:332) {
files_list <- list.files(directory, full.names=TRUE)
#create list of files
df1 <- data.frame()
#create empty data frame
df2 <- complete.cases(df1, read.csv(files_list[1]))
#populate df1 with complete cases from file id=1
nrows(df2)
#calculate number of rows per id number 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment