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

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

Tezan Sahu

Examples

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

# Get details of all PFTs
res1 <- search.pfts(server)
#> Sorry! Server not responding.

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

# Get details of all PFTs containing of 'cultivar' type
res3 <- search.pfts(server, pft_type="cultivar")
#> Sorry! Server not responding.

# Get details of PFTs with 'SIPNET' model type
res4 <- search.pfts(server, model_type='SIPNET')
#> Sorry! Server not responding.