getInvaCostVersion: Download and read a specific version of 'InvaCost'

View source: R/getInvaCostVersion.R

getInvaCostVersionR Documentation

Download and read a specific version of 'InvaCost'

Description

This function will download the requested major release of 'InvaCost' to the specified file, then read it into R, such that analyses done on older releases of the database can be reproduced.

Usage

getInvaCostVersion(version = "4.1", destination_file = NULL)

Arguments

version

character indicating the major release to download. Current versions include: "1.0", "2.0", "2.1", "3.0", "4.0" and "4.1",

destination_file

character indicating the name of the saved file

Details

The public archive for 'InvaCost' releases is available here: https://figshare.com/articles/dataset/InvaCost_References_and_description_of_economic_cost_estimates_associated_with_biological_invasions_worldwide_/12668570

The files used in this function correspond to official releases by the 'InvaCost' team and are downloaded in CSV (sep = ";") from a dedicated GitHub repository: https://github.com/Farewe/invacost_versions

Value

a data.frame with dimensions variable depending on the chosen version.

Author(s)

Boris Leroy leroy.boris@gmail.com, Andrew Kramer, Anne-Charlotte Vaissière, Christophe Diagne

References

https://github.com/Farewe/invacost

Leroy Boris, Kramer Andrew M, Vaissière Anne-Charlotte, Kourantidou Melina, Courchamp Franck & Diagne Christophe (2022). Analysing economic costs of invasive alien species with the invacost R package. Methods in Ecology and Evolution. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/2041-210X.13929")}

Examples

invacost <- getInvaCostVersion("1.0")
dim(invacost)

invacost documentation built on May 29, 2024, 3:34 a.m.