download_resource: Download an HDX resource

Description Usage Arguments Value Examples

View source: R/resource.R

Description

Download an HDX resource into a specific folder

Usage

1
2
3
4
5
6
7
8
download_resource(
  resource,
  folder = NULL,
  filename = NULL,
  quiet = FALSE,
  force = FALSE,
  ...
)

Arguments

resource

Resource, an HDX resource

folder

Character, path of the directory where you will store the data

filename

Character, name of the file you will download

quiet

Logical, no progress bar from download (default = FALSE)

force

Logical, force download (default = FALSE)

...

extra paramaters

Value

Resource

Examples

1
2
3
4
5
6
7
## Not run: 
#Setting the config to use HDX default server
 set_rhdx_config()
 res <- read_resource("98aa1742-b5d3-40c3-94c6-01e31ded6e84")
 download_resource(res, folder = "/tmp")

## End(Not run)

dickoa/rhdx documentation built on May 7, 2020, 2 p.m.