Displaying 1 result from an estimated 1 matches for "220a1".
Did you mean:
2201
2008 Jul 08
4
Manipulate Data (with regular expressions)
Dear Everyone,
I try to automatically manipulate the data of a variable (class =
factor) like
x
220
220a
221
221b
B221
Into two variables (class = numeric) like
x y
220 0
220 1
221 0
221 1
221 1
y has to carry the information about the class (number or string) of the
former x-Variable.
I could do it by hand like
x[x == "220a"] <- 220