R extended summary numerical values including kurtosis, skew, etc? [duplicate]

怎甘沉沦 提交于 2019-12-13 10:40:55

问题


Is there a one-liner in R that will give me the following stats for each numerical column of a dataframe?

count, mean, median, q3, q1, iqr, mode, min, max, antimode, pstdev, sstdev, pvar, svar, mad, madraw, pskew, sskew, pkurt, skurt, dpo, jarque

Something like an extended method of summary(dt)? Any ideas?


回答1:


The describe() method in the psych package does include kurtosis and skew:

dt = data.frame(a=rnorm(1000),b=rnorm(1000)) library(psych) describe(dt)

vars n mean sd median trimmed mad min max range skew kurtosis se a 1 1000 0 1.01 0 0.01 1.00 -3.59 3.36 6.95 -0.06 0.17 0.03 b 2 1000 0 0.97 0 0.00 0.93 -3.15 3.10 6.25 -0.08 -0.07 0.03



来源:https://stackoverflow.com/questions/28814322/r-extended-summary-numerical-values-including-kurtosis-skew-etc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!