I am trying to submit my answers to the swirl program (R programming - Functions unit). No matter what answers I put in, even the ones that I know are correct, it asks me to repeat the question.
For example,
"Below we will create a function called boring_function. This function takes
the argument x
as input, and returns the value of x without modifying it.
Delete the pound sign in front of the x to make the function work! Be sure to
save this script and type submit() in the console after you make your changes."
boring_function <- function(x) {
#x
}
So I submit:
> boring_function <- function(x) {
x
}
> submit()
And it gives me this error:
"Sourcing your script... Not quite! Try again. Make sure to delete the pound sign so the last expression in the function is just x."
If I skip this question, and go on to later questions, it does the same thing.
Do I need to uninstall/reinstall the swirl package or is there some other problem?
Thanks in advance.
The results of sessionInfo()
R version 3.2.5 (2016-04-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_Canada.1252 LC_CTYPE=English_Canada.1252
[3] LC_MONETARY=English_Canada.1252 LC_NUMERIC=C
[5] LC_TIME=English_Canada.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] swirl_2.4.2
loaded via a namespace (and not attached):
[1] httr_1.2.1 magrittr_1.5 R6_2.1.3 tools_3.2.5 RCurl_1.95-4.8
[6] curl_2.0 yaml_2.1.13 crayon_1.3.2 stringi_1.1.1 stringr_1.1.0
[11] digest_0.6.10 testthat_1.0.2 bitops_1.0-6