# NOT RUN {
# init dataset
library(sjmisc)
data(efc)
# plot efc-data frame summary
sjt.df(efc, altr.row.col = TRUE)
# plot content, first 50 rows of first 5 columns of example data set
sjt.df(efc[1:50, 1:5], describe = FALSE, string.var = "Observation")
# plot efc-data frame summary, sorted descending by mean-column
sjt.df(efc, sort.col = "mean", sort.asc = FALSE)
# plot first 20 rows of first 5 columns of example data set,
# sort by column "e42dep" with alternating row colors
sjt.df(efc[1:20, 1:5], altr.row.col = TRUE,
sort.col = "e42dep", describe = FALSE)
# plot first 20 rows of first 5 columns of example data set,
# sorted by 4th column in descending order.
sjt.df(efc[1:20, 1:5], sort.col = 4, sort.asc = FALSE, describe = FALSE)
# add big mark to thousands
library(datasets)
sjt.df(as.data.frame(WorldPhones), big.mark = ",")
# User defined style sheet
sjt.df(efc, altr.row.col = TRUE,
CSS = list(css.table = "border: 2px solid #999999;",
css.tdata = "border-top: 1px solid;",
css.arc = "color:blue;"))
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab