Description Usage Arguments Details Value Examples
Simple search function that searches text elements within the Cellosaurus
XML document, to find entries that contain any of the terms provided in
the text
parameter. For greater control, consider using
cell_lines_filter
instead.
1 | cell_line_find_first(cellosaurus, text)
|
cellosaurus |
An XML document containing the Cellosaurus dataset. |
text |
Some text to search for. Finding is handled using XPath so some special characters may cause difficulties, including these: '/:[]*. Can take a string or a character vector of length > 1. If providing a vector, the function will search for cell-lines that match any of the terms (i.e., "or"). |
This function provides a quick way to find matching text, but is constrained
in a couple of important ways. It will only search in text sections of the
XML dataset (i.e., the values between XML tags). This means that it cannot
find anything that Cellosaurus stores in attributes (e.g. sex=''
entries). Conversely, the function will search in all of the text sections,
without discrimination; it cannot search only in specific sections. For
more advanced control, use the cell_lines_filter
function,
which has neither of these constraints.
An XML node containing a cell-line (or an xml_missing
node if
the search text is not found). If there are multiple matches, the first
is returned.
1 2 3 4 5 6 7 | cellosaurus <- read_cellosaurus_xml(system.file("extdata",
"cellosaurus.xml",
package = "rcellosaurus"))
cell_line_find_first(cellosaurus, "CVCL_3449")
# Can store the cell-line for use later.
CVCL_6873 <- cell_line_find_first(cellosaurus, "CVCL_6873")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.