Learn R Programming

RSurvey (version 0.6-0)

Data: Set or Query Data and Parameters

Description

A function to set or query all data and parameters used in RSurvey.

Usage

Data(option, value, clear.all = FALSE, clear.proj = FALSE, 
     clear.data = FALSE)

Arguments

option
character; the parameter name, see Parameters.
value
a parameter value specified for option.
clear.all
logical; if TRUE all parameters are cleared from Data, its default is FALSE.
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.

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.

Data

Imported raw data is saved to the data frame data.raw (see ReadData). Processed point data is saved to the data frame data.pts and interpolated surface data to the list data.grd (see ProcessData).

Examples

Run this code
# 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 clear all parameters, use at your own risk
Data(clear.all = TRUE)

Run the code above in your browser using DataLab