Description Usage Arguments Value Examples
View source: R/searchLocations.R
This function takes searches for site IDs that contain the value provided. It is useful for identifying the correct site names. Note that if you use the graph interface you will need to select 'No more' when you have finished selecting sites.
1 2 3 4 5 6 7 | searchLocations(
searchterm,
searchbyID = FALSE,
folder,
folderOR = FALSE,
graphic.interface = FALSE
)
|
searchterm |
(optional) text that will be used to find site IDs that contain this value. If no search term is provided all site IDs will be returned. |
searchbyID |
(optional) boolean (TRUE/FALSE) If FALSE will use the search term on the name. If this argument is TRUE then the search term will be used on the identifier. The default is FALSE. |
folder |
(optional) character (either one or multiple) that will filter the locations to only those that contain the term provided in the folder name. If multiple are provided the function will return all locations that contain any of the search terms. |
folderOR |
(optional) boolean (TRUE/FALSE) that by default (FALSE) means that multiple inputs to the argument folder will be all required in any output (AND). If TRUE this will mean that matching any of the inputs to the argument folder will be enough to be included in the result (OR). |
graphic.interface |
(optional) boolean (TRUE/FALSE) If TRUE it will use a graphic box to ask the user which datasets to include starting with selecting the primary folder. The default is FALSE which does not impact the function. |
Returns a data frame with two columns, the name and the identifier of each site
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Returns all locations
searchLocations()
Returning all locations that contain "AK" in the folder name
searchLocations(folder = "AK")
Using the graphic interface to select locations
searchLocations(graphic.interface = TRUE)
Using the graphic interface to select locations but only looking in the folders that contain "Alaska"
searchLocations(folder = "Alaska", graphic.interface = TRUE)
The same as the previous line of code except it gives the site identifiers instead of the names.
searchLocations(folder = "AK", graphic.interface = TRUE, searchbyID = TRUE)
Selecting all sites that include "BELA" and using the graphic interface to select more sites
searchLocations("BELA", graphic.interface = "TRUE")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.