Learn R Programming

SPOTMisc (version 1.19.52)

prepare_data_plot: Prepare data for plots

Description

Data preparation

Usage

prepare_data_plot(
  model = buildRanger,
  modelControl = list(),
  x,
  namesx = paste("x", 1:ncol(x), sep = ""),
  y,
  namesy = "y",
  log = NULL,
  nameslog = NULL
)

Value

list with plotting data and information

Arguments

model

a function that can be used to build a model based on the data, e.g. : buildRanger or buildKriging. Default is buildRanger, since it is fast and robust.

modelControl

a list of control settings for the respective model. Default is an empty list (use default model controls).

x

a matrix of x-values to be plotted (i.e., columns are the independent variables, rows are samples). Should have same number of rows as y and log.

namesx

character vector, printable names for the x data. Should have same length as x has columns. Default is x1, x2, ...

y

a one-column matrix of y-values to be plotted (dependent variable). Should have same number of rows as x and log.

namesy

character, giving a printable name for y. Default is "y".

log

matrix, a data set providing (optional) additional dependent variables (but these are not modeled). Should have same number of rows as y and x.

nameslog

character vector, printable names for the log data. Should have same length as log has columns. Default is NULL (no names).