Works for me with current R-2.6.0 (but you haven't told us about your R 
version!):

 > cut(1:5, 1:5)
[1] <NA>  (1,2] (2,3] (3,4] (4,5]
Levels: (1,2] (2,3] (3,4] (4,5]
 > cut(1:5, 1:5, right=FALSE)
[1] [1,2) [2,3) [3,4) [4,5) <NA>
Levels: [1,2) [2,3) [3,4) [4,5)


Uwe Ligges

Pedro de Barros wrote:
> Dear All,
> 
> I am trying to use cut() to produce intervals open on the right, but 
> it seems to ignore the argument right=F, contrary to what is 
> indicated on the help for cut.
> 
> Can anyone help?
> 
> Thanks,
> Pedro
> 
> ______________________________________________
> 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.

______________________________________________
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