50% off: Unlimited data and AI learning.
State of Data and AI Literacy Report 2025

blackbox (version 1.1.46)

prepareData: 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)

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.

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)

Examples

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

Run the code above in your browser using DataLab