Re: [R] Equivalent of chartr to numeric

2014-07-17 Thread ALBERTO VIEIRA FERREIRA MONTEIRO
Replying to self: > > Is there any equivalent to chartr for numeric values? > > Meaning, something like: > > numerictr(c(-1, 42, 666), 1:3, numeric.stuff) > > that replaces in "numeric.stuff" (a vector, matrix, etc) all instances > of -1 for 1, 42 for 2 and 666 for 3? > match does it. Sorry to ask.

[R] Equivalent of chartr to numeric

2014-07-17 Thread ALBERTO VIEIRA FERREIRA MONTEIRO
Is there any equivalent to chartr for numeric values? Meaning, something like: numerictr(c(-1, 42, 666), 1:3, numeric.stuff) that replaces in "numeric.stuff" (a vector, matrix, etc) all instances of -1 for 1, 42 for 2 and 666 for 3? Alberto Monteiro