StringToNumbers {Sconify} | R Documentation |
Takes a vector of strings and outputs simple numbers. This takes care of the case where conditions are listed as strings (basal, IL7), in which case they are converted to numbers (1, 2)
StringToNumbers(strings)
strings |
vector of strings |
strings: same vector with each unique element converted to a number
ex.string <- c("unstim", "unstim", "stim", "stim", "stim") StringToNumbers(ex.string)