Message-ID: <CAN6BBTT8yo6_7qB1BdjEvZ3gAggDcOcmvqFy_fStqJBV5aAAJQ@mail.gmail.com>
Date: 2015-08-16T16:39:28Z
From: Nikita Dinger
Subject: Error while submission
I have completed part 2 of the assignment and am getting the desired output.
But on submitting the code, it shows as the answer is incorrect along with
this message:
function (..., list = character(), package = NULL, lib.loc = NULL, verbose
= getOption("verbose"),
envir = .GlobalEnv)
Result: Sorry, your answer was incorrect.
The following is my code for part 2:
complete <- function(directory, idvec = 1:332) {
df <- data.frame(id = integer(), nobs = integer())
for (id in idvec) {
filename <- paste(directory, "/",
sprintf("%03d", as.integer(id)),
5 ".csv", sep = "")
filename <- list.files()
dat <- rbind(dat, read.csv(filename[id]))
}
str(data)
for (id in idvec)
{nd <- data.frame(id = id,
nobs = nrow(na.omit(dat)))
df <- rbind(df, nd)
}
return(df)
}
I am using R 3.2.1 on a Windows 8 laptop.
How shall I solve this?
Thanks and regards
Nikita
[[alternative HTML version deleted]]