View source: R/utilities-data.R
stringToNum | R Documentation |
Convert string to numeric
stringToNum(string, lloqMode = LLOQMode$`LLOQ/2`, uloqMode = ULOQMode$ULOQ)
string |
A string or a list of strings to be converted to numeric values |
lloqMode |
How to treat entries below LLOQ, i.e., of a form "<2":
|
uloqMode |
How to treat entries above ULOQ, i.e., of a form ">2":
|
Tries to convert each string to a numeric with as.numeric()
.
If any conversion fails and returns NA
, the value is tested for being a LLOQ-
or a ULOQ value, i.e., of a form "<2" or ">2", respectively. If this is a case,
the returned value is defined by the parameters lloqMode
and uloqMode
.
In any other case where the string cannot be converted to a numeric, NA
is returned.
A numeric value or a list of numeric values
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.