airbaseFindCode(country = c("AL", "AT", "BA", "BE", "BG", "CH", "CY", "CZ", "DE", "DK", "EE", "ES", "FI", "FR", "GB", "GR", "HR", "HU", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "ME", "MK", "MT", "NL", "NO", "PL", "PT", "RO", "RS", "SE", "SI", "SK", "TR"), site.type = c("background", "traffic", "industrial", "unknown"), area.type = c("rural", "urban", "suburban", "unknown"), local.code = NA, city = NA, site = NA, emep = NA, lat = c(-90, 90), lon = c(-180, 180))
grep
). The search string can be upper or lower case
e.g. city = "london"
. To extract several cities
e.g. Copenhagen and Barcelona use city = c("copenhagen",
"barcelona")
. Note that by default any matching characters are
returned, so city = "london"
would also return Londonderry
(Northern Ireland).Regular expression searches are very powerful and potentially
complicated. However there are a few useful tips. To match the
beginning of a name use ^. So city =
"^london"
would return London and Londonderry (both begin with
london). To match the end of a name use $, so
city = "london$"
would just return London but not
Londonderry.
The cities chosen are printed to screen to make it easy to check (and refine the search string) of the selected sites.
city
for details of how to search.NA
(the default, selects everything).importAirbase
.
importAirbase
,
airbaseFindCode
, airbaseStats
and
airbaseInfo
## select all sites in Denmark
## Not run: sites <- airbaseFindCode(country = "DK")
#
# ## traffic sites in Germany and the UK
# sites <- airbaseFindCode(country = c("DE", "GB"), site.type = "traffic")## End(Not run)
Run the code above in your browser using DataLab