decorate_generic: Extract data and decorate it as expected for an Assesser...

Description Usage Arguments Details Value

View source: R/setter.R

Description

From a test data_frames, extract col_names and id_names, and gathers the col_names columns with given value_name and key_name.

Usage

1
2
decorate_generic(test_data, col_names, id_names, value_name,
  key_name = NULL)

Arguments

test_data

'data.frame()'
A dataframe with vectors as columns from which to fetch the data.

col_names

'character()'
Column names to extract from the dataframe.

id_names

'character()'
Column used as unique line ids.

value_name

'character(1)' Name of value output column.

key_name

'character(1)' Name of key column when extracted data is gathered. If NULL, then value_columns are not gathered but combined.

Details

If 'key_name == NULL', then columns are combined into one column with name 'value_name'.

Value

A gathered data.frame with columns ".id", 'value_name', and optionnaly 'key_name'. The key column is then of type factor, otherwise the value column is of type factor.


signaux-faibles/MLsegmentr documentation built on Aug. 29, 2019, 2:22 p.m.