2

describeのコマンドからの出力の最初の 2 行のみを表示する方法はありHmiscますか?

nデータの安全上の理由から、出力には、missinguniqueおよびmean、場合によってはヒストグラムしか表示できません。

これは、頻度とパーセンタイルだけでなくlowest、出力も非表示にする必要があることを意味します。highest

これは可能ですか?そうでない場合は、おそらく自分で値を計算する必要があります。

4

1 に答える 1

4
library(Hmisc)

res <- describe(rnorm(400))

#Look at the structure.
str(res)
#It's a list! You can change the objects in it.

res$counts <- res$counts[1:4]
res$values <- NULL

print(res)
#rnorm(400) 
#      n missing  unique    Mean 
#    400       0     400 0.05392 
于 2013-08-13T10:05:31.623 に答える