On Nov 23, 2009, at 8:14 AM, joris meys wrote:
Dear all,
I'm looking for a function comparable to switch, to categorize a
continuous variable in a few levels.
?cut
Off course that can be done with
a series of ifelse statements, but that looks rather clumsy. I looked
at switch, but couldn'
Never mind, found the function :
cut(test,breaks=c(0,10,50,90,100),labels=c("lowest","low","high","highest"),include.lowest=T,right=F)
Cheers
Joris
On Mon, Nov 23, 2009 at 2:14 PM, joris meys wrote:
> Dear all,
>
> I'm looking for a function comparable to switch, to categorize a
> continuous va
Dear all,
I'm looking for a function comparable to switch, to categorize a
continuous variable in a few levels. Off course that can be done with
a series of ifelse statements, but that looks rather clumsy. I looked
at switch, but couldn't figure out how to use it for this. I guess
that's not possi
3 matches
Mail list logo