namc-utah / NAMCr

NAMC Database and Analysis R API
MIT License
0 stars 0 forks source link

NAMCr

NAMC Database and Analysis API for R

Install

Development version

install.packages("remotes")
remotes::install_github("namc-utah/NAMCr")

Update

Update to latest package version

detach("NAMCr", unload=TRUE)
remotes::install_github("namc-utah/NAMCr", force=TRUE, upgrade="never", quiet=TRUE)

Examples

Example via namespace

requireNamespace("NAMCr")

data = NAMCr::query("sites")
View(data)

Example via package loading

library("NAMCr")

data = query("sites")
View(data)

data = query("projectOrganisms", projectIds=c(1,2))
View(data)

data = query("projectOrganisms", projectIds=c(1,2))
View(data)

Refresh API schema / Credentials

requireNamespace("NAMCr")

# Refresh cached API schema to capture API updates
NAMCr::reinitiate()

# Refresh cached API schema and credentials
NAMCr::reinitiate(TRUE)

View API Documentation

requireNamespace("NAMCr")

NAMCr::docs()

View Information on all Endpoint

requireNamespace("NAMCr")

NAMCr::info()

View Information on an Individual Endpoint

requireNamespace("NAMCr")

NAMCr::info("samples")

List Available Endpoints

requireNamespace("NAMCr")

NAMCr::endpoints()

Connection Diagnostics

requireNamespace("NAMCr")

NAMCr::diagnose_connection()

CLI (command line interface)

Example CLI call

requireNamespace("NAMCr")

data = NAMCr::cli()