[R] matrix(unlist(strsplit(""))) 'missing value' issue
ilai
keren at math.montana.edu
Wed Mar 28 17:34:04 CEST 2012
On Wed, Mar 28, 2012 at 6:49 AM, Petr PIKAL <petr.pikal at precheza.cz> 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
>
>>
>> Nobody any solution for my problem??
>>
>> --
>> View this message in context:
> http://r.789695.n4.nabble.com/matrix-unlist-
>> strsplit-missing-value-issue-tp4509065p4511668.html
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list