Hi there,

I am Darius and I am taking the R Programming course in Coursera. I have a
problem that I had spent so much looking for the problem. I wrote my code
and I believe that the code works perfectly fine because it produces the
result as what the course demanded. However, when I tried to submit it, it
says that my code is wrong. I do believe I make mistake, but I cannot seem
to find it. the code is as follow:

Complete.R

complete <- function(directory, id = 1:332) {
  file <- list.files(directory, full.names=TRUE)
  nobs <- c()
  for (i in id){
    file1 <- read.csv(file[i])
    nobs1 <- sum(complete.cases(file1))
    nobs <- c(nobs, nobs1)
    df <- data.frame(nobs)
  }
  return(data.frame(id,df))
}


Please give me a hint where I should look at.

Thank you very much for your time and concern. I look forward hearing back
from you.

Sincerely,

Darius Mulia.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to