Set or Query Data and Parameters

Description

A function to set or query parameters and their attributes.

Usage

1
2
Data(option, value, which.attr = NULL, clear.proj = FALSE, clear.data = FALSE,
     replace.all = NULL)

Arguments

option

character; the parameter name, see ‘Parameters’.

value

a parameter value specified for option (optional).

which.attr

character, a non-empty character string specifying which attribute is to be accessed.

clear.proj

logical; if TRUE basic GUI preferences will be saved and all other data removed; its default is FALSE.

clear.data

logical; if TRUE only data sets will be removed, its default is FALSE.

replace.all

list; a replacement list of parameter values.

Value

If value is given the object specified by option is returned. A NULL value is returned for objects not yet assigned a value and where no default value is available. Default values are specified internally within this function.

Data

Imported raw data is saved to the data frame data.raw, see ImportText. Processed point data is saved to the data frame data.pts and interpolated surface data is saved to the list data.grd, see ProcessData.

Parameters

Parameters undefined elsewhere in this documentation include:

ver

character; the package version number.

win.loc

character; the default horizontal and vertical location for GUI placement in pixels.

Author(s)

J.C. Fisher

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# To set a parameter
Data("test1", 3.14159265)
Data("test2", list(id = "PI", val = 3.14159265))
# To retrieve a parameter value
Data("test1")
Data("test2")
Data(c("test2", "id"))
Data(c("test2", "val"))
# To get all parameter values
d <- Data()
# To remove all saved parameter values
Data(replace.all = list())
# To recover saved parameter values
Data(replace.all = d)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.