toNum {scMappR} | R Documentation |
To Numeric.
Description
This function checks if your vector is not a character and if it is, then converts it to a numeric.
Usage
toNum(x)
Arguments
x |
A character, factor, or numeric vector. |
Value
toNum
Returns a numeric vector.
Examples
# vector of factors
fact <- factor(c("1", "2", "3", "4"))
# convert to numeric
num <- toNum(x = fact)
[Package scMappR version 1.0.11 Index]