get_non_empty_fields_by_prefix {moodef} | R Documentation |
Get non-empty values from fields with a specific prefix
Description
This function takes a dataframe, a row index, and a prefix, returning a vector with the content of columns that start with the given prefix and are not empty.
Usage
get_non_empty_fields_by_prefix(df, i, prefix)
Arguments
df |
A dataframe containing the relevant columns. |
i |
An integer representing the row index. |
prefix |
A string representing the prefix of the column names (e.g., "a_", "fb_a_", "tag_"). |
Value
A vector with non-empty values from the fields with the given prefix in the specified row.
[Package moodef version 1.2.0 Index]