Skip to contents

Compute values for a new column based on an input column.

Usage

compute_column(input_columns, output_column, fcn, ...)

Arguments

input_columns

(character) The name of a column in the input table used to compute a new column.

output_column

(character) The name of the newply computed column.

fcn

(function) The function used to compute the values for the new column.

...

Additional slots and values passed to struct_class.

Value

A compute_column object with the following output slots:

updated(annotation_source) The updated annotations as an annotation_source object.

Details

This object makes use of functionality from the following packages:

  • dplyr

Inheritance

A compute_column object inherits the following struct classes:

[compute_column] -> [model] -> [struct_class]

References

Wickham H, François R, Henry L, Müller K, Vaughan D (2023). dplyr: A Grammar of Data Manipulation. R package version 1.1.4, https://CRAN.R-project.org/package=dplyr.

Examples

M <- compute_column(
        input_columns = character(0),
        output_column = character(0),
        fcn = function(){})