1

これら 2 つが同じ結果を返さないのはなぜですか?

    D = data.frame( x=c( 0.6 ) )

    D$binned = cut( D$x, seq( 0.50,0.70,0.025 ), include.lowest=TRUE, right=FALSE )
    D # 0.6 is binned correctly as [0.6,0.625)

    D$binned = cut( D$x, seq( 0.55,0.65,0.025 ), include.lowest=TRUE, right=FALSE )
    D # 0.6 is binned incorrectly as [0.575,0.6)
4

2 に答える 2

1

D$binned = cut( D$x, round(seq( 0.55,0.65,0.025 ),3), include.lowest=TRUE, right=FALSE )

D

x binned

1 0.6 [0.6,0.625)

于 2013-07-13T08:41:06.187 に答える