Pattern replacement with multiple patterns
Arguments
- pattern
character vector of patterns
- replacement
character vector of replacements
- x
character vector with input data to be curated
- ignore.case
logical indicating whether to perform pattern matching in case-insensitive manner, where
ignore.case=TRUEwill ignore the uppercase/lowercase distinction.- ...
additional arguments are passed to
base::gsub()orbase::sub().- replace_multiple
logical vector indicating whether to perform global substitution, where
replace_multiple=FALSEwill only replace the first occurrence of the pattern, usingbase::sub(). Note that this vector can refer to individual entries inpattern.
Details
This function is a simple wrapper around base::gsub()
when considering a series of pattern-replacement
combinations. It applies each pattern match and replacement
in order and is therefore not vectorized.
See also
Other jam utility functions:
ashape(),
avg_angles(),
avg_colors_by_list(),
bulk_cnet_adjustments(),
cell_fun_bivariate(),
collapse_mem_clusters(),
colorRamp2D(),
deconcat_df2(),
display_colorRamp2D(),
enrichList2geneHitList(),
find_colname(),
find_enrich_colnames(),
get_hull_data(),
get_igraph_layout(),
handle_igraph_param_list(),
isColorBlank(),
make_legend_bivariate(),
make_point_hull(),
mem_find_overlap(),
order_colors(),
rank_mem_clusters(),
rotate_coordinates(),
subgraph_jam(),
summarize_node_spacing(),
xyAngle()