I am trying to download population count data (100m pixel size) from WorldPop using the R package wpgpDownloadR. The code:

# install.packages("devtools")

wd = "path"

r <- wpgpGetCountryDataset(ISO3 = "GRC",
                            covariate = "ppp_2018"
                            destDir = path)

But i am getting this error:

Error: unexpected symbol in:
"                            covariate = "ppp_2018"

Even if I change the destDir argument to destDir = "the/whole/path" I am getting the same error. Also, I tried the method argument without success. I have tried this solution, but still the same error. Any ideas why?

1 Answer 1


Your definition of path is not correct, and you miss a comma after "ppp_2018". The following works, creating a "path" directory inside the current working directory and downloading the file:


path <- paste0(getwd(),"/path")

r <- wpgpGetCountryDataset(ISO3 = "GRC",
                           covariate = "ppp_2018",
                           destDir = path)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.