search.pfts: Search for PEcAn PFTs from the database

View source: R/search.pfts.R

search.pftsR Documentation

Search for PEcAn PFTs from the database

Description

Search PEcAn PFTs from the database using search string based on PFT name, type & model type. Hits the ⁠/api/pfts/⁠ API endpoint with relevant query parameters

Usage

search.pfts(
  server,
  pft_name = "",
  pft_type = "",
  model_type = "",
  ignore_case = TRUE
)

Arguments

server

Server object obtained using the connect() function

pft_name

Search string for pft name. Default: "" (Returns all pfts)

pft_type

PFT type to be filtered. Could be one out of "plant", "cultivar" or "". Default: "" (Returns PFTs of all types)

model_type

Search string for model type associated with PFT. Default: "" (Returns PFTs with any model type)

ignore_case

Indicator of case sensitive or case insensitive search

Value

Response obtained from the ⁠/api/pfts/⁠ 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 PFTs
res1 <- search.pfts(server)

# Get details of all PFTs containing 'temperate' in their name
res2 <- search.pfts(server, pft_name="temperate")

# Get details of all PFTs containing of 'cultivar' type
res3 <- search.pfts(server, pft_type="cultivar")

# Get details of PFTs with 'SIPNET' model type
res4 <- search.pfts(server, model_type='SIPNET')

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