urlToTemp {basifoR}R Documentation

Temporary NFI data

Description

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

Usage

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

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))



[Package basifoR version 0.4 Index]