This function converts one or more columns of AcousticData
by the function given by ConversionFunction
.
ConvertAcoustic(
AcousticData,
TargetVariable = character(),
ConversionFunction = c("Constant", "Addition", "Scaling", "AdditionAndScaling"),
GruopingVariables = character(),
Conversion = data.table::data.table()
)
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".
The variable to modify.
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.
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.
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".
A AcousticData
object.