find_colname | R Documentation |
Find colname by character string or pattern matching
find_colname(
pattern,
x,
max = 1,
index = FALSE,
require_non_na = TRUE,
verbose = FALSE,
...
)
pattern |
character vector containing text strings or regular expression patterns. |
x |
input |
max |
integer maximum number of results to return. |
index |
logical indicating whether to return the column
index as an integer vector. When |
require_non_na |
logical indicating whether to require the column to contain non-NA values, default is TRUE. The intent of this function is to find colnames whose data will match expectations, and when require_non_na is TRUE, this function will continue until it finds a column with non-NA values. |
... |
additional arguments are passed to |
This function is intended to help find a colname given
a character vector of expected values or regular expression
patterns. By default it returns the first matching value,
but can return multiple if max=Inf
.
If there are no colnames(x)
then NULL
is returned.
The order of operations:
Match exact string.
Match exact string in case-insensitive manner.
Match the start of each string using jamba::provigrep()
.
Match the end of each string using jamba::provigrep()
.
Match each string using jamba::provigrep()
.
The results from the first successful operation is returned.
When there are duplicate colnames(x)
only the first
unique name is returned.
character vector with length max
, or if no pattern
match is found it returns NULL
. Also if there are no
colnames(x)
then it returns NULL
.
Other jam utility functions:
avg_angles()
,
avg_colors_by_list()
,
call_fn_ellipsis_deprecated()
,
cell_fun_bivariate()
,
collapse_mem_clusters()
,
colorRamp2D()
,
deconcat_df2()
,
display_colorRamp2D()
,
enrichList2geneHitList()
,
filter_mem_genes()
,
filter_mem_sets()
,
get_hull_data()
,
get_igraph_layout()
,
gsubs_remove()
,
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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.