Programmatic access to the list of zero replacement methods that
replace_zeros() runs, and their associated functions.
Arguments
- val
Sets the return value for this function call. See "Value" section below. Default:
"data.frame"- nm
What value to use for the names of the returned object. Default is
"id"whenvalis"list"or"func", otherwise the default isNA(no name).- method
The name of a zero replacement method to search for. Supports partial matching. All non-alpha characters are ignored.
Value
match_zero_replacement()
A list with the following elements.
name: Method name, e.g."Multiplicative Replacement"id: Method ID, e.g."mult"func: The function for this method, e.g.ecodive::replace_zeros_multparams: Formal args forfunc, e.g.c("counts", "margin", "delta")
list_zero_replacements()
The returned object's type and values are controlled with the val and
nm arguments.
val = "data.frame": The data.frame from which the below options are sourced.val = "list": A list of objects as returned bymatch_zero_replacement()(above).val = "func": A list of functions.val = "id": A character vector of method IDs.val = "name": A character vector of method names.
If nm is set, then the names of the vector or list will be the method ID
(nm="id") or name (nm="name"). When val="data.frame", the names will
be applied to the rownames() property of the data.frame.
