0
當您製作直方圖並定義breaks
參數時,R會使用一些函數來生成這些中斷。我想獲得由直方圖生成的場所的範圍內的值,使得如果我作了如下直方圖R從直方圖獲取中斷值
hist(df$foo, breaks = 5)
我想具有中斷的值範圍的列表或data.frame:
list(c("1_lower"="<num>","1_upper"="<num2>","2_lower"="<num3>","2_upper"="<num4>"))
我希望這是可能的。任何幫助是極大的讚賞。
你可以使用'cut'。同時檢查[這裏](https://stackoverflow.com/questions/21775556/getting-same-output-as-cut-using-speedier-hist-or-findinterval) – akrun
看看'hist'文檔 - 如果你設置'h <-hist(...)',然後'h $ breaks'會給你斷點 –
'p < - hist(df $ foo,breaks = 5); p $休息' – Masoud