| search_rows | R Documentation |
I sometimes need to see which rows of a matrix-like structure
contain a string matched by a search pattern.
This somewhat similar to writing a matrix-like structure to disk and then
using search_files on it.
search_rows(x, pattern = ".*", include_row_names = TRUE)
x |
A |
pattern |
A pattern. |
include_row_names |
Include row names into the search? |
All rows where the pattern was found in at least one column.
Other searching functions:
compare_vectors(),
file_modified_last(),
find_files(),
fromto(),
grep_file(),
missing_docs,
runsed(),
search_files(),
summary.filesearch()
p <- "\\<4.0[[:alpha:]]*\\>"
search_rows(x = mtcars, pattern = p)
search_rows(x = mtcars, pattern = p, include_row_names = FALSE)
try(search_rows(x = mtcars, pattern = "ABC"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.