This function assembles a dataframe consisting of the years and areas where the azmpdata
packages\'s data has been collected, as well as the associated file(s) where the data can be found.
area_indexer(
years = NULL,
areanames = NULL,
areaTypes = NULL,
datafiles = NULL,
months = NULL,
doMonths = F,
doParameters = F,
parameters = NULL,
fuzzyParameters = TRUE,
qcMode = F
)
Arguments
years |
default is NULL . If you want to restrict the available data by one or more
years, a vector of desired years can be provided (e.g. area_indexer(years=c(2017,2018)) ) |
areanames |
default is NULL . If you want to restrict the available data by one or
more specific named areas, a vector of them can be provided (e.g. area_indexer(areanames=c("HL","HL2")) ) |
areaTypes |
default is NULL . If you want to restrict the available data by one or more
area "types", a vector of desired types can be provided. Valid values for areaTypes are:
"area", "section", and "station". (e.g. area_indexer(areaTypes=c("section")) ) |
datafiles |
default is NULL . If you want to restrict the available data to just that
contained by one or more particular azmpdata data files, a vector of the files to check can be
provided. . (e.g. area_indexer(datafiles=c("Ice_Annual_Broadscale")) ) A complete list
of the available files can be seen by checking data(package="azmpdata") |
months |
default is NULL . If you want to restrict the available data by one or more
months, a vector of desired months can be provided (e.g. area_indexer(months=c(1,2,3,4)) ) |
doMonths |
default is F . If this is set to TRUE , the results will include
information about what month the data was collected (when available). |
doParameters |
default is F . Identifying all of the parameters that were collected
at each combination of area/site/year is a bit more intensive than leaving them out. To force
this function to do this, set this parameter to doParameters=T . If one or more parameters
are provided, the function will override this default value and set doParameters=F |
parameters |
default is NULL . Many parameters exist - any named parameter found in
any data file should work. (e.g. area_indexer(parameters=c("Arctic_Calanus_species",
"integrated_phosphate_50")) ) |
fuzzyParameters |
default is T . By default, any discovered parameters that match
values within parameters will be returned. For example, parameter="nitrate" will
return fields such as "integrated_nitrate_0_50", "integrated_nitrate_50_150", and "nitrate". If
you want exact matches only, set fuzzyParameters = F . |
qcMode |
default is F . Information about unexpected values will be shown. |
Value
a data.frame
Note
Note that each additional filter that gets sent will reduce the number of results returned.
For example, if doMonths = TRUE
and years = 2010
, only those results from 2010 that
also have monthly data will be returned.
Author
Mike McMahon, Mike.McMahon@dfo-mpo.gc.ca
Examples