extra_attrs_to_cols | R Documentation |
New columns from extra attributes
extra_attrs_to_cols(data, ..., flatten = FALSE, keep_empty = TRUE)
data |
An interaction data frame. |
... |
The names of the extra attributes; NSE is supported. Custom column names can be provided as argument names. |
flatten |
Logical: unnest the list column even if some records have multiple values for the attributes; these will yield multiple records in the resulted data frame. |
keep_empty |
Logical: if 'flatten' is 'TRUE', shall we keep the records which do not have the attribute? |
Data frame with the new column created; the new column is list type if one interaction might have multiple values of the attribute, or character type if
extra_attrs
has_extra_attrs
with_extra_attrs
filter_extra_attrs
extra_attr_values
i <- omnipath(fields = "extra_attrs")
extra_attrs_to_cols(i, Cellinker_type, Macrophage_type)
extra_attrs_to_cols(
i,
Cellinker_type,
Macrophage_type,
flatten = TRUE,
keep_empty = FALSE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.