util.profile.fnames: density/stacked bar plots for both numeric/categorical...

Description Usage Arguments Value Examples

View source: R/utils-plot.R

Description

profile both numeric (numeric type) and categorical (character or factor type) variables

Usage

1
util.profile.fnames(data, fnames, segment, alpha = 0.8, scale = 1)

Arguments

data

input data.frame

fnames

variables to be profiled

segment

variable name of the segment

alpha

float density plot transparency

scale

float scale of density plot

Value

list(data, plot)

Examples

1
2
3
4
mtcars['am'] <- factor(mtcars[['am']])
res <- util.profile.fnames(mtcars, c('am','wt'), segment = 'gear')
library(patchwork)
wrap_plots(res$plot) + plot_layout(guides = 'collect')

6chaoran/lh2util documentation built on Nov. 29, 2020, 1:28 a.m.