Data: Set or Query Data and Parameters

Description Usage Arguments Value Data Parameters Author(s) Examples

Description

This function is used 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. Parameter name, see ‘Parameters’ section.

value

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 graphical user interface (GUI) preferences will be saved and all other data removed.

clear.data

logical. If true, only datasets will be removed.

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 unprocessed 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.

Parameters

Parameters undefined elsewhere in the help documentation include:

ver

package version number

win.loc

default horizontal and vertical location for GUI placement in pixels.

Author(s)

J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# set a parameter
Data("test1", 3.14159265)
Data("test2", list(id = "PI", val = 3.14159265))

# retrieve a parameter value
Data("test1")
Data("test2")
Data(c("test2", "id"))
Data(c("test2", "val"))

# get all parameter values
d <- Data()

# remove all saved parameter values
Data(replace.all = list())

# recover saved parameter values
Data(replace.all = d)

USGS-R/RSurvey documentation built on May 9, 2019, 6:10 p.m.