prepareData {blackbox}R Documentation

Prepare data and controls for smoothing

Description

This sorts the data, identifies parameters and function value (response), identifies pairs of response values for identical parameter values, and may set some global controls in blackbox.options().

Usage

prepareData(data, ParameterNames=NULL, respName=NULL,
            verbose=TRUE)

Arguments

data

A data frame including variables in ParameterNames and respName

ParameterNames

Names of the variables to be used as predictors of the smoothed surface. If NULL, all columns except the last are assumed to hold parameter values.

respName

Name of the variable to be used as response of the smoothed surface. If NULL, the last column is assumed to hold function values.

verbose

Whether to print some information (in particular a message if replicate responses values are identical for given parameter values, whichwill be suspect in some applications)

Value

A data frame with the required variables, ordered by increasing values as in do.call(order,data). This may set some global controls in blackbox.options() as a side effect.

Examples

require(spaMM)
data(blackcap) ## use dataset as template
sorted_etc <- prepareData(data=blackcap,ParameterNames=c("longitude", "latitude"),
                    respName="means")

[Package blackbox version 1.1.46 Index]