Skip to contents

Return matrix (features in rows and samples in columns) where several features are squished (flattened) into a single one. The number and order of features to be flattened does not matter. New row with the new name specified by user will be created, and will be positive (value of 1) if any of the features to flatten are positive.

Usage

flatten_feature(new_name, features_to_flatten, incoming_data)

Arguments

new_name

String of the new feature name.

features_to_flatten

Vector of features (row names) to be flattened.

incoming_data

Matrix or data frame of features.

Value

matrix