[R] matrix(unlist(strsplit(""))) 'missing value' issue
MaartenJacobs
maart_jacobs at hotmail.com
Wed Mar 28 18:36:26 CEST 2012
Thank you!!
Been googling for hours, but kind of hard to find something if you don't
know how to look for it.
So thanks again!!
Greetings Maarten
ilai-2 wrote
>
> On Wed, Mar 28, 2012 at 6:49 AM, Petr PIKAL <petr.pikal@> wrote:
>> What problem? Nabble is not available to all and here is not much to cook
>> from.
>
> Indeed. Also the OP actually provided their own solution, just 5 more
> minutes of googling to find ?sub.
>
> bankoffer.3 <-
> factor(c('9999999','429000:notaccepted','48000:notaccepted'))
> bankoffer.3 <- gsub('999999','NA:NA',bankoffer.3)
> as.data.frame(matrix(unlist(strsplit(as.character(bankoffer.3),":")),
> ncol = 2, byrow = TRUE))
>
> Cheers
>
--
View this message in context: http://r.789695.n4.nabble.com/matrix-unlist-strsplit-missing-value-issue-tp4509065p4512847.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list