Skip to content

Instantly share code, notes, and snippets.

@ansakoy
Last active December 24, 2015 20:29
Show Gist options
  • Save ansakoy/6858185 to your computer and use it in GitHub Desktop.
Save ansakoy/6858185 to your computer and use it in GitHub Desktop.
Computing for Data Analysis Programming assignment 2
complete <- function(directory, id = 1:332) {
nobs <- numeric(0)
source("getmonitor.R")
for (i in id) {
data <- getmonitor(i, "specdata")
numbers <- as.numeric(complete.cases(data))
total <- sum(numbers)
nobs <- c(nobs, total)
}
result = data.frame(id = id, nobs = nobs)
return (result)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment