[R] levels values of cut()

2008-08-09 Thread baptiste auguie
Dear list, I have the following example, from which I am hoping to retrieve numeric values of the factor levels (that is, without the brackets): x - seq(1, 15, length=100) y - sin(x) my.cuts - cut(which(abs(y) 1e-1), 3) levels(my.cuts) hist() does not suit me for this, as it does not

Re: [R] levels values of cut()

2008-08-09 Thread Stephen Tucker
Message From: baptiste auguie [EMAIL PROTECTED] To: r-help@r-project.org Sent: Saturday, August 9, 2008 1:51:01 AM Subject: [R] levels values of cut() Dear list, I have the following example, from which I am hoping to retrieve numeric values of the factor levels (that is, without the brackets

Re: [R] levels values of cut()

2008-08-09 Thread Prof Brian Ripley
On Sat, 9 Aug 2008, baptiste auguie wrote: Dear list, I have the following example, from which I am hoping to retrieve numeric values of the factor levels (that is, without the brackets): x - seq(1, 15, length=100) y - sin(x) my.cuts - cut(which(abs(y) 1e-1), 3) levels(my.cuts) hist()

Re: [R] levels values of cut()

2008-08-09 Thread baptiste auguie
Thank you all for the precious tips. For memory I've made the following wrapper function for this. I wonder whether a short note on these regular expressions could be useful on the help page of cut(). cutIntervals - function(x, ...){ dotArgs - unlist(c(...)) if( any(names(dotArgs)

Re: [R] levels values of cut()

2008-08-09 Thread Prof Brian Ripley
On Sat, 9 Aug 2008, baptiste auguie wrote: Thank you all for the precious tips. For memory I've made the following wrapper function for this. I wonder whether a short note on these regular expressions could be useful on the help page of cut(). Already there in R-devel cutIntervals