filter.sites {neotoma2}R Documentation

Apply a filter for Neotoma sites objects.

Description

The filter function takes a sites object and allows a user to filter on a number of properties. Since a sites object is a nested object (it contains collection units, datasets, samples, etc.) the degree to which filtering occurs depends on the amount of data contained within the sites object. Filtering parameters include:

Usage

## S3 method for class 'sites'
filter(x, ...)

Arguments

x

A sites object.

...

arguments to filter by.

Value

filtered sites object

Examples


# Download 100 sites, but only keep the sites that are close to sea level.
some_sites <- get_sites(sitename = "Lake%", limit = 3)
site_subset <- some_sites %>% filter(altitude < 100)
# Download 100 sites, get all associated datasets, but keep only
# sites/datasets that are of datasettype "pollen":
sites <- get_sites(limit = 1) %>%
  get_datasets(all_data = TRUE)
pollen_subset <- sites %>% filter(datasettype == "pollen")


[Package neotoma2 version 1.0.3 Index]