search.sites | R Documentation |
Search PEcAn Sites from the database using search string based on
sitename. Hits the /api/sites/
API endpoint with
relevant query parameters
search.sites(server, sitename = "", ignore_case = TRUE)
server |
Server object obtained using the connect() function |
sitename |
Search string for site name Default: "" (Returns all sites) |
ignore_case |
Indicator of case sensitive or case insensitive search |
Response obtained from the /api/sites/
endpoint with relevant query parameters
Tezan Sahu
server <- connect(url="http://pecan.localhost:80", username="carya", password="illinois")
# Get details of all sites
res1 <- search.sites(server)
# Get details of all sites containing 'willow' in their name
res2 <- search.sites(server, sitename="willow")
# Get details of sites where name contains "Willow" (case sensitive)
res3 <- search.sites(server, sitename="Willow", ignore_case=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.