sdanzige wrote:
> 
> 
> Thank you, but the regular expression example doesn't seem to work
> correctly.
> 
> 

I wrote a regular expression that does seem to work, so I'll post it here
for anyone else that needs it.

labs<-levels(df$p_bin)
cbind(lower=as.numeric(sub("[[(]","",sub(",.*","",labs))),
        upper=as.numeric(sub("[])]","",sub("[[(].*, *","",labs))) )


I fear my inelegance will peg me as a Windows programmer, but so be it... 
-S
-- 
View this message in context: 
http://www.nabble.com/cut2-once%2C-bin-twice...-tp26020736p26028296.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@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.

Reply via email to