argoDefaultDestdir {argoFloats} | R Documentation |
Get Default Values
Description
These are helper functions that permit customization of various aspects of
functions within the argoFloats package. The idea is that values can be set
using options()
or by using system 'environment variables', freeing the
user from the necessity of altering the parameters provided to various
argoFloats functions. See “Details” for more on the individual
functions, noting that the entry for argoDefaultServer()
is written with
the most detail, with other entries relying on the background
established there.
Usage
argoDefaultDestdir()
argoDefaultServer()
argoDefaultIndexAge()
argoDefaultProfileAge()
argoDefaultBathymetry()
hasArgoTestCache()
Details
-
argoDefaultServer()
ThegetIndex()
andgetProfiles()
functions download data from a remote machine with URL specified by an argument namedserver
. A user may prefer one server over another, perhaps due to speed of downloads to a particular research laboratory. However, that choice might not be best for another user, or even the same user at another time. Code reusability would be enhanced if the user had a way to alter the value of theserver
argument across all code, thereby eliminating the need to work in a text editor to find all instances of the function call. This is whereargoDefaultServer()
is useful. It lets the user specify a value forserver
either in R, using a call likeoptions(argoFloats.server="ifremer-https")
within R code (perhaps in the user's.Rprofile
file), or by defining an environment variable namedR_ARGOFLOATS_SERVER
at the operating-system level. If theargoFloats.server
option has not been set in R, andR_ARGOFLOATS_SERVER
has not been set in the OS, thenargoDefaultServer()
defaults toc("ifremer-https","usgodae")
. -
argoDefaultDestdir()
returns the name of the local directory into which to store indices and other argo data. The option is namedargoFloats.destdir
, the environment variable is namedR_ARGOFLOATS_DESTDIR
, and the default is '"~/data/argo". -
argoDefaultIndexAge()
returns the number of days beyond which an index is regarded as stale (and thus in need of a new download). The option is namedargoFloats.indexAge
, the environment variable is namedR_ARGOFLOATS_INDEX_AGE
, and the default is 1.0, for 1 day. -
argoDefaultProfileAge()
returns the number of days beyond which an individual profile netCDF file is regarded as stale (and thus in need of a new download). The option is namedargoFloats.profileAge
, the environment variable is namedR_ARGOFLOATS_PROFILE_AGE
, and the default is 365.0 days. (Note that this is much higher than the value forargoDefaultIndexAge()
, on the assumption that users will prefer recent indices, to get new data, but will prefer to update profile-specific datasets infrequently.) -
argoDefaultBathymetry()
returns a value for thebathymetry
argument used byplot,argoFloats-method()
. The option is namedargoFloats.bathymetry
, the environment variable is namedR_ARGOFLOATS_BATHYMETRY
, and the default isFALSE
. -
hasArgoTestCache()
is not a user-facing function. Rather, its purpose is to speed the running of test suites during development, by preventing multiple downloads of data already downloaded.
Value
A value as described above, depending on the particular function in question.
Examples
argoDefaultServer()
argoDefaultDestdir()
argoDefaultIndexAge()
argoDefaultProfileAge()
argoDefaultBathymetry()