Create a factor BCfac in which the blood.glucose variable in the thuesen data (from the ISwR package) is divided into the intervals (4, 7], (7, 9], (9, 12]. Change the level names to “low”, “intermediate”, “high” and “very high”.

 

   blood.glucose short.velocity
1           15.3           1.76
2           10.8           1.34
3            8.1           1.27
4           19.5           1.47
5            7.2           1.27
6            5.3           1.49
7            9.3           1.31
8           11.1           1.09
9            7.5           1.18
10          12.2           1.22
...

 

(from: Dalgaard, 2008, Introductory Statistics with R, Springer)