Downloading CHIRPs rainfall data

Hello team, i am trying to download chirps product, however i am getting error "unused argument" relating to my folder to which i need data to be downloaded to
getCHIRPS("africa", format = "tifs", tres = "daily", sres = 0.05, begin = as.Date("1999-01-01"), end = as.Date("2018-10-31"), dsn = file.path(getwd("D:/Rainfall"), "CHIRPS data"))

Could you please turn this into a self-contained reprex (short for reproducible example)? It will help us help you if we can be sure we're all working with/looking at the same stuff.


If you've never heard of a reprex before, you might want to start by reading the help page. The reprex dos and don'ts are also useful.

What to do if you run into clipboard problems

If you run into problems with access to your clipboard, you can specify an outfile for the reprex, and then copy and paste the contents into the forum.

reprex::reprex(input = "fruits_stringdist.R", outfile = "")

For pointers specific to the community site, check out the reprex FAQ.

I suspect that your problem lies here:

getwd() doesn’t take any parameters, hence the “unused parameter” error. Since you’re just supplying an absolute file path here, all you need is:

file.path("D:/Rainfall", "CHIRPS data")

Note that I can’t verify that this is the only problem, since there’s no reproducible example to work with. If you try this and turn up another error, I think your best bet is to take @mara’s very good advice :grin:.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.