Thursday, July 31, 2014

Creating Factor from Continuous Variable

Here we use the weight column of women dataset to create 3 levels of factor:
wf <- cut(women$weight,3)
> table(wf)
   wf
(115,131] (131,148] (148,164]
        6         5         4 

No comments:

Post a Comment