Created
November 13, 2015 01:43
-
-
Save ttal1/81c5fe7a6c32efa2f3c4 to your computer and use it in GitHub Desktop.
complete practice
This file contains hidden or 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
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