Skip to content

Instantly share code, notes, and snippets.

@kostajh
Forked from ttal1/gist:81c5fe7a6c32efa2f3c4
Last active November 13, 2015 01:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kostajh/ce81abda5eb3653a8876 to your computer and use it in GitHub Desktop.
Save kostajh/ce81abda5eb3653a8876 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(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