search.models: Search for PEcAn Models from the database

View source: R/search.models.R

search.modelsR Documentation

Search for PEcAn Models from the database

Description

Search PEcAn Models from the database using search string based on model_name & revision. Hits the ⁠/api/models/⁠ API endpoint with relevant query parameters

Usage

search.models(server, model_name = "", revision = "", ignore_case = TRUE)

Arguments

server

Server object obtained using the connect() function

model_name

Search string for model name Default: "" (Returns all models)

revision

Search string for revision. Default: "" (Returns all revisions for a model)

ignore_case

Indicator of case sensitive or case insensitive search

Value

Response obtained from the ⁠/api/models/⁠ endpoint with relevant query parameters

Author(s)

Tezan Sahu

Examples

server <- connect(url="http://pecan.localhost:80", username="carya", password="illinois")

# Get details of all models
res1 <- search.models(server)

# Get details of all models containing 'sip' in their name
res2 <- search.models(server, model_name="sip")

# Get details of the 'ssr' revision of the 'SIPNET' model
res3 <- search.models(server, model_name="SIPNET", revision="ssr")

# Get details of models where name contains "SIP" (case sensitive)
res4 <- search.models(server, model_name="SIPNET", ignore_case=FALSE)

PecanProject/rpecanapi documentation built on April 2, 2024, 8:17 a.m.