Description Usage Arguments Details Author(s) Examples
Download sp or sf file format from GADM in the internal library of the package and/or a specified path and/or a temporary path.
1 2 |
country |
character string, name of the country to download |
format |
character string, format to downlaod, either sp or sf |
level |
integer between 0 and 3 or 4, level of the administrative borders, 0 being country borders. |
intlib |
boolean, specifies whether the downloaded file should be saved
in the library of packages. If |
save |
boolean, specifies whether the downloaded file should be saved
in a specific path or not. If |
path |
character string, path to save the downloaded file. If
|
force |
boolean, force to download the file even if already in the path.
By default |
If the save
and/or intlib
arguments are NULL
, it will
be asked interactively to the user to decide where to store the file. The
function will return a message if the file is already present in the internal
library or in the specify path. The function will only download the file if
it's not available in the internal library and the path inputted but the
download can be forced (argument force == TRUE
) if the file present
has a problem.
The table will show you the interaction between these two arguments
to download and path to saved sp or sf file format from GADM:
|--intlib = FALSE
| |-- save = FALSE
| | *-- no disk memory
| |-- save = TRUE
| | |-- path = NULL
| | *-- working directory
| | |-- path = PATH
| | *-- PATH
| |-- save = NULL
| | |-- `Do you want to save the map in another location?`
| | |-- yes
| | |-- `Can you provide the path to the location?`
| | | *-- working directory (default)
| | | *-- PATH
| | |-- no (default)
|--intlib = TRUE
| |-- save = FALSE
| | *-- internal library
| |-- save = TRUE
| | |-- path = NULL
| | *-- internal library + working directory
| | |-- path = PATH
| | *-- internal library + PATH
| |-- save = NULL
| | |-- `Do you want to save the map in another location?`
| | |-- yes
| | |-- `Can you provide the path to the location?`
| | | *-- internal library+ working directory (default)
| | | *-- internal library+ PATH
| | |-- no (default)
|--intlib = NULL
|-- `Do you want to save the map in your internal library?`
*-- no >> intlib = FALSE
*-- yes >> intlib = TRUE
Marc Choisy, Lucie Contamin
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.