ConvertAcoustic: Convert AcousticData

Description Usage Arguments Value

View source: R/DefineAndUpdateVariables.R

Description

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

Usage

1
2
3
4
5
6
7
ConvertAcoustic(
  AcousticData,
  TargetVariable = character(),
  ConversionFunction = c("Constant", "Addition", "Scaling", "AdditionAndScaling"),
  GruopingVariables = character(),
  Conversion = data.table::data.table()
)

Arguments

AcousticData

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 AcousticData object.


RstoxData documentation built on July 17, 2021, 5:08 p.m.