Hi Darius,

This is the main R-help list. We don't know anything about your Coursera
class, including what your code is supposed to do. Not only that, this list
has a no homework policy.

You need to use the discussion group associated with your course, or
whatever materials it provides, to get assistance.

Sarah

On Tuesday, July 22, 2014, Darius Mulia <muliadar...@gmail.com> wrote:

> 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 <javascript:;> 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.
>


-- 
Sarah Goslee
http://www.stringpage.com
http://www.sarahgoslee.com
http://www.functionaldiversity.org

        [[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