My students have been running into this problem trying to use the textbook code from Statistical Modeling: A Fresh Approach, this semester. I'm not familiar with the syntax used in the original question (with the number as the first argument), but this does not appear to be supported syntax in the fetch::fetchData()
function. The workflow that we have been using to get around this (slightly simpler than summea's answer) is:
install.packages("devtools")
devtools::install_github("ProjectMOSAIC/fetch")
data <- fetch::fetchData("whickham.csv")
Note that I cannot reproduce the example in the original question, as I get different error/warning messages:
data<-fetch::fetchData(1,c("Web_scraping","Data_mining"))
With this as the error/warning:
Error in if (show.path) return(get("path", envir = .fetchEnvironment)) :
argument is not interpretable as logical
In addition: Warning message:
In if (show.path) return(get("path", envir = .fetchEnvironment)) :
the condition has length > 1 and only the first element will be used
I hope fetch is on its way to being on CRAN, and listed as a dependency of mosaic, as this is currently causing headaches in my class.