Package 'fgeo.x'

Title: 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>).
Authors: Mauro Lepore [aut, ctr, cre] (ORCID: <https://orcid.org/0000-0002-1986-7988>), Jess Zimmerman [dtc], CTFS-ForestGEO [cph, fnd]
Maintainer: Mauro Lepore <[email protected]>
License: GPL-3
Version: 1.1.4.9000
Built: 2026-06-02 10:09:06 UTC
Source: https://github.com/forestgeo/fgeo.x

Help Index


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