Title: Access Small ForestGEO Datasets For Examples
Version: 1.1.4
Description: Access small example datasets from Luquillo, a ForestGEO site in Puerto Rico (https://forestgeo.si.edu/sites/north-america/luquillo).
License: GPL-3
URL: https://github.com/forestgeo/fgeo.x
BugReports: https://github.com/forestgeo/fgeo.x/issues
Depends: R (≥ 3.2)
Imports: memoise (≥ 1.1.0), utils
Suggests: spelling (≥ 2.1), testthat (≥ 2.1.1)
Encoding: UTF-8
Language: en-US
LazyData: true
RoxygenNote: 6.1.1
NeedsCompilation: no
Packaged: 2019-06-07 20:06:04 UTC; mauro
Author: Mauro Lepore ORCID iD [aut, ctr, cre], Jess Zimmerman [dtc], CTFS-ForestGEO [cph, fnd]
Maintainer: Mauro Lepore <maurolepore@gmail.com>
Repository: CRAN
Date/Publication: 2019-06-07 21:10:04 UTC

fgeo.x: Access Small ForestGEO Datasets For Examples

Description

Access small example datasets from Luquillo, a ForestGEO site in Puerto Rico (<https://forestgeo.si.edu/sites/north-america/luquillo>).

Author(s)

Maintainer: Mauro Lepore maurolepore@gmail.com (0000-0002-1986-7988) [contractor]

Other contributors:

See Also

Useful links:


Access data via library(fgeo.x) or fgeo.x::<dataset-name>.

Description

These are small datasets for examples, with no value for research. They have been adapted from the package fgeo.data.

See Also

Other datasets: download_data, example_path

Examples

str(elevation)

str(habitat)

str(stem5)

str(stem6)

str(tree5)

str(tree6)

str(tree6_3species)

str(vft_4quad)

Access data stored online.

Description

Access data stored online.

Usage

download_data(x, destfile = NULL)

Arguments

x

A string giving the name of the dataset to download. The name of any dataset listed here (without the extension).

destfile

a character string (or vector, see url) with the name where the downloaded file is saved. Tilde-expansion is performed.

Value

A dataset.

See Also

utils::download.file()

Other datasets: datasets, example_path

Examples

# Not running CRAN checks (may take longer than the allowed run time limit)

# Defaults to read data
# The first call is memoised
system.time(download_data("unique_id"))
# Subsequent calls use the memoised data, so takes no time
system.time(download_data("unique_id"))

download_data("unique_id")

# Can download data to a destination file given by `destfile`
tmp <- tempfile()
download_data("unique_id", destfile = tmp)
load(tmp)
unique_id

available_data <- "https://github.com/forestgeo/fgeo.data/tree/master/data"
if (interactive()) browseURL(available_data)


Access data stored in system files.

Description

example_path() mostly wraps system.file(..., package = "fgeo.x").

Usage

example_path(path = NULL)

Arguments

path

Name of file or directory. If NULL, the example files and directories will be listed.

Value

A character string.

See Also

Other datasets: datasets, download_data

Examples

example_path()

dir(example_path("rdata"))

example_path("taxa.csv")

str(read.csv(example_path("taxa.csv")))