[R] apply with function

Jörg Reuter joerg at reuter.at
Thu Oct 20 23:20:47 CEST 2011

(Iske <- matrix(c(1, 1, 1, 2, 2, 2, 10, 1, 1, 5,
ncol = 5))
numtochar <- function(Zahl){
text <- rawToChar(as.raw(Iske[1,]))}

I have a little problem with the command apply(). I want use the
function numtochar for every row and the result should be a vector
with the chars for every row.
At the moment the function numtorow create a char with all items, but
separate not every row.
I think the function apply is the right way, bu I did not know how to
use it at this example. Attention: At the real data set every row have
a other length (!)

More information about the R-help mailing list