urlToTemp: Temporary NFI data

Description Usage Arguments Details Value Author(s) Examples

Description

This function is implemented by other routines of the package to decompress .zip files with data sets of the SNFI.

Usage

1
urlToTemp(url., timeOut = timeout(60))

Arguments

url.

character. URL/path to a compressed file of the SNFI (.zip) having data of either .dbf or .mdb file extensions..

timeOut

request. Maximum request time, see timeout. Default timeout(60)

Details

The data sets are decompressed in a temporary file of the local machine. Compressed data containing file extensions other than .mdb or .dbf are not supported.

Value

character. Path to the NFI data (.mdb or .dbf) stored in a temporary file

Author(s)

Wilson Lara <wilarhen@gmail.com>, Cristobal Ordonez <a_cristo@pvs.uva.es>, Felipe Bravo <fbravo@pvs.uva.es>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
madridNFI <- system.file("ifn3p28_tcm30-293962.zip", package="basifoR")
tfmad <- urlToTemp(madridNFI)
tfmad

## Internet resources fail gracefully with an informative message if
## the resource is not available or has changed (and not give a check
## warning nor error):

path <- '/es/biodiversidad/servicios/banco-datos-naturaleza/090471228013cbbd_tcm30-278511.zip'
url2 <- httr::modify_url("https://www.miteco.gob.es", path = path)

tfmad <- urlToTemp(url2, timeOut=timeout(1))

basifoR documentation built on Sept. 20, 2021, 9:06 a.m.

Related to urlToTemp in basifoR...