[R] do.call

Dominic Roye dominic.roye at gmail.com
Tue Dec 4 13:38:03 CET 2012


Hello,

I have a problem with the "do.call-function". I would like to merge
the values of more than 30 columns, but not in all of the rows exist
values, so with this commando i get a lot of ";" or NA.

How get i only the merge of cells with a number?


datos$NEW <- do.call(paste, c(datos[,19:53], sep = ";"))


 $ NEW                              : chr
"218.0;;;;;;;;;;;;;;;;;;;;;;;;NA;;;NA;;;NA;NA;NA;NA;NA


I hope you can help me. Thanks!

Best regards,

Dominic



More information about the R-help mailing list