get_smarter_datasets: Get SMARTER Datasets

Description Usage Arguments Value Passing additional parameters Examples

View source: R/datasets.R

Description

Fetch SMARTER REST API datasets endpoint and returns results in a dataframe. Cached token is used or a new token is generated if not provided when calling this function (see get_smarter_token for more information)

Usage

1
get_smarter_datasets(query = list(), token = NULL)

Arguments

query

a list of query arguments

token

a string with a valid token

Value

Returns a dataframe with selected datasets

Passing additional parameters

Datasets 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 "Sheep" datasets you need to provide list(species="Sheep") as query parameter. Endpoint supports query by type and chip_name. In addition, you can search using a pattern in file contents through the search parameter. See Swagger Datasets endpoint for more information about the datasets endpoint

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
genotypes_foreground <- get_smarter_datasets(
  query = list(type = "foreground", type = "genotypes")
)

adaptmap_genotypes <- get_smarter_datasets(
  query = list(species = "Goat", search = "adaptmap", type = "genotypes")
)
## Not run: 

all_datasets <- get_smarter_datasets()

## End(Not run)

cnr-ibba/r-smarter-api documentation built on Jan. 14, 2022, 9:42 p.m.