data("mtcars") # load base R example dataset
# overall info for wt (Weight)
peek_neat(mtcars, 'wt', f_print = TRUE)
#'
# now groupped by cyl (Number of cylinders)
peek_neat(mtcars, 'wt', group_by = 'cyl')
# grouped by cyl and gear
peek_neat(mtcars,
'wt',
group_by = c('cyl', 'gear'),
f_print = TRUE)
# filter to only have cyl larger than 4
peek_neat(mtcars, 'wt', group_by = 'cyl', filt = cyl > 4)
# without plots
peek_neat(mtcars,
'wt',
group_by = 'cyl',
f_plot = "",
f_print = TRUE)
# with histogramms etc, using plot_neat
peek_neat(mtcars, 'wt', group_by = 'cyl', f_plot = plot_neat)
# with Q-Q plots, via ggpubr
peek_neat(mtcars,
'wt',
group_by = 'cyl',
f_plot = ggpubr::ggqqplot)
# skewness and kurtosis data via psych
if (FALSE) {
info_df = peek_neat(
mtcars,
'wt',
group_by = 'cyl',
f_print = psych::describe,
f_plot = ""
)
info_df # contains all data returns by psych::describe
}
Run the code above in your browser using DataLab