Obtaining nice cuts in Hmisc with cut2 (without the [ ) signs )
问题 I'm currently trying to neatly cut data with use of the Hmisc package, as in the example below: dummy <- data.frame(important_variable=seq(1:1000)) require(Hmisc) dummy$cuts <- cut2(dummy$important_variable, g = 4) The produced cuts are correct with respect to the values: important_variable cuts 1 1 [ 1, 251) 2 2 [ 1, 251) 3 3 [ 1, 251) 4 4 [ 1, 251) 5 5 [ 1, 251) 6 6 [ 1, 251) > table(dummy$cuts) [ 1, 251) [251, 501) [501, 751) [751,1000] 250 250 250 250 However, I would like for the data to