Here you will find daily news and tutorials about R, contributed by over 750 bloggers.
There are many ways to follow us - By e-mail:On Facebook: If you are an R blogger yourself you are invited to add your own R content feed to this site (Non-English R bloggers should add themselves- here)

(This article was first published on TeachR, and kindly contributed to R-bloggers)

An updated version of my package fancycut is on CRAN. The package has one function, fancycut(), that is more versatile than cut() for certain applications. cut() takes a numeric vector and turns it into a factor or categorical vector. It works best when they are no gaps in the intervals you have defined and when the are all either right handed or left handed. It does not like point intervals or mixed open, closed, etc. fancycut() is OK with all of this. It uses interval notation we learned in high school math which is why I like it. Here is an example

fancycut(
x = -10:10,
SubZero = '(-Inf,0)',
Zero = '[0,0]',
Small = '(0,2]',
Medium = '(2,5)',
Large = '[5,10]',
out.as.factor = FALSE
)