deconcat_df2: Deconcatenate delimited column values in a data.frame

deconcat_df2R Documentation

Deconcatenate delimited column values in a data.frame

Description

Deconcatenate delimited column values in a data.frame

Usage

deconcat_df2(x, column, split = "[,; |/]+", blank = "", ...)

Arguments

x

data.frame or compatible object

column

character vector with one or more colnames(x) that should be de-concatenated.

split

character pattern used by strsplit() to split multiple values in each column.

blank

character string used to replace entries that would otherwise be zero-length as returned by strsplit().

...

additional arguments are ignored.

Details

This function deconcatenates delimited values in a column of a data.frame by calling strsplit() on column values, and repeating values in all other columns to match lengths() following strsplit().

This function includes a correction for cases where strsplit() would otherwise return zero-length entries, and which would otherwise be dropped from the output. From this function, zero-length entries are replaced with blank="" so these rows are not dropped from the output.

See Also

Other jam utility functions: avg_angles(), avg_colors_by_list(), call_fn_ellipsis_deprecated(), cell_fun_bivariate(), collapse_mem_clusters(), colorRamp2D(), display_colorRamp2D(), enrichList2geneHitList(), filter_mem_genes(), filter_mem_sets(), find_colname(), get_igraph_layout(), gsubs(), handle_igraph_param_list(), isColorBlank(), make_legend_bivariate(), make_point_hull(), mem_find_overlap(), order_colors(), rank_mem_clusters(), rotate_coordinates(), subgraph_jam(), subset_mem(), summarize_node_spacing(), xyAngle()

Examples

df <- data.frame(one=c("AB", "BC", "AC"),
   two=c("a,b", "b,c", "a,c"));
deconcat_df2(df, column="two")


jmw86069/multienrichjam documentation built on Feb. 7, 2024, 12:58 a.m.