| clean | R Documentation |
Function that removes duplicate objects such as sites, datasets, or collection units. When we pull in a large number of objects, or overlapping searches, we can run into a problem where we have multiple instances of the same site, but with different datasets. This function attempts to gather all objects together:
Before: {site: 1, dataset: 1}, {site: 1, dataset: 2}
After: {site: 1, dataset: [1, 2]} So the site is gathered, and the datasets are now part of an array of datasets.
clean(x, verbose = TRUE, ...)
## S3 method for class 'sites'
clean(x, verbose = TRUE, ...)
## S3 method for class 'collunits'
clean(x, verbose = TRUE, ...)
## S3 method for class 'datasets'
clean(x, verbose = TRUE, ...)
x |
sites, datasets, collunits that may have duplicates. |
verbose |
parameter to prints out progress bar |
... |
Additional parameters associated with the call. |
clean neotoma objects without duplicates after concatenation
Simon Goring goring@wisc.edu
tryCatch({
alex <- get_sites(sitename = "Alex%")
alex2 <- get_sites(24)
c <- c(alex, alex2) #uncleaned
}, error = function(e) {
message("Neotoma server not responding. Try again later.")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.