> structure(dat_de$total_all)
[1] 11 11 9 6 9 15 10 6 11 10 10 9 7 13 7 5 5 8 10 14 9 10 13 6 10 11 12 22 11 1 7 9 12 7 7 11 9 7 15 10 6 10
[43] 8 10 9 8 14 5 10 12 14 9 10 18 8 8 15
> structure(dat_en$total_all)
[1] 25 10 12 17 10 11 11 9 9 25 14 10 13 22 13 10 11 15 20 11 9 15 9 14 10 19 10 9 8 14 4 18 16 7 10 13 9 11 12
This is my variable "Total_all" in the german and english version. I want to put the results of the describe function (see below) of these two variables in a presentable table. Preferably one table for both variables, if that is possible.
> describe(dat_de$total_all)
vars n mean sd median trimmed mad min max range skew kurtosis se
X1 1 57 9.81 3.45 10 9.62 2.97 1 22 21 0.73 1.81 0.46
> describe(dat_en$total_all)
vars n mean sd median trimmed mad min max range skew kurtosis se
X1 1 39 12.69 4.69 11 12.24 2.97 4 25 21 1.01 0.61 0.75
I'm grateful for your help :)
I'm not quite sure which library the describe
function is in [edit: looks like you're using the one from the psych
package] but you can make a simple, nice looking table using the kable
function from knitr
:
library(knitr)
library(psych)
de_dat_descr <- data.frame(describe(dat_de$total_all), row.names = "de_dat_descr")
en_dat_descr <- data.frame(describe(dat_en$total_all), row.names = "en_dat_descr")
dat.df <- t(rbind.data.frame(de_dat_descr, en_dat_descr))
kable(dat.df)