Fetch SMARTER REST API samples endpoint and returns results in a dataframe.
Usage
get_smarter_samples(species, query = list())
Passing additional parameters
Samples endpoint supports additional parameters when making queries.
Additional parameters need to be passed as list
using the query
parameter. For example, to get all the "foreground" samples you need to
provide list(type="foreground")
as query
parameter.
Endpoint supports a lot of parameters and some of them can be provided
multiple times
See
Swagger Samples endpoint for more information about the samples endpoint
Examples
italian_sheeps <- get_smarter_samples(
"Sheep",
query = list(country = "Italy")
)
merino_sheeps <- get_smarter_samples("Sheep", query = list(breed = "Merino"))
selected_goats <- get_smarter_samples(
"Goat",
query = list(country = "Italy", breed_code = "ORO", breed_code = "GAR")
)
if (FALSE) {
foreground_goats <- get_smarter_samples(
"Goat",
query = list(type = "foreground")
)
all_sheep_samples <- get_smarter_samples("Sheep")
}