cell_line_lists: Template function for extracting lists of items related to...

Description Usage Arguments Details

View source: R/cell_line-details.R

Description

Internal function, used by functions that gather things that are stored in the XML as lists. Each of these has a particular list container element, e.g. name-list, and an object element name.

Usage

1
2
cell_line_lists(cell_line, attrib = NULL, list_element, item_element,
  attrib_name, contents = TRUE)

Arguments

cell_line

A node or nodeset referring to a cell-line or multiple cell-lines.

attrib

A character vector specifying which Types to output. If NULL, the function returns all values (i.e., unfiltered).

list_element

The XML element name for the list item

item_element

The XML element name for the objects within the list

attrib_name

The XML attribute name for the categorisation of list items

contents

Whether to report the contents of the list items rather than returning the whole of each XML node. See Details.

Details

Some (but not all) of the objects support categorisation, e.g. names can be of type "identifier" or type "synonym". Where that is the case, this function takes both an argument with the category(ies) being filtered on (attrib) and the name of the categorisation (attrib_name), which is used to form the XPath search term.

The parameter contents defines whether to return the contents of the nodes found (using the XPath code /text()). In cases where the relevant information is stored as an attribute of the node rather than as text within it (e.g. references), we need to return the whole of the nodes, so specify contents = FALSE.


jimvine/rcellosaurus documentation built on May 14, 2019, 8:04 a.m.