This function converts one or more columns of StoxAcousticData by the function given by ConversionFunction.

ConvertStoxAcoustic(
  StoxAcousticData,
  TargetVariable = character(),
  ConversionFunction = c("Constant", "Addition", "Scaling", "AdditionAndScaling"),
  GruopingVariables = character(),
  Conversion = data.table::data.table()
)

Arguments

StoxAcousticData

An input of ModelData object

The parameters of the ConversionFunction are "Constant" for ConversionFunction "Constant", "Addition" for ConversionFunction"Addition", "Scaling" for ConversionFunction "Scaling", and "Addition" and "Scaling" for ConversionFunction "AdditionAndScaling".

TargetVariable

The variable to modify.

ConversionFunction

Character: The function to convert by, one of "Constant", for replacing the specified columns by a constant value; "Addition", for adding to the columns; "Scaling", for multiplying by a factor; and "AdditionAndScaling", for both adding and multiplying.

GruopingVariables

A vector of variables to specify in the Conversion. The parameters specified in the table are valid for the combination of the GruopingVariables in the data.

Conversion

A table of the GruopingVariables and the columns "TargetVariable", "SourceVariable" and the parameters of the ConversionFunction (see details).

The parameters of the ConversionFunction are "Constant" for ConversionFunction "Constant", "Addition" for ConversionFunction"Addition", "Scaling" for ConversionFunction "Scaling", and "Addition" and "Scaling" for ConversionFunction "AdditionAndScaling".

Value

A StoxAcousticData object.