f_stat_group_ana: analyse group difference of dataset

Description Usage Arguments Value See Also Examples

Description

creates a html document with a group analysis including:

The function automatically renders three html pages one for the additional static plots, one for the tableplot and one for the alluvial plots. In the same direcotry that can be determined by the outputfile parameter. Default behaviour will also render the entire html document returning the filepath of the new html file. The other three html files will be linked to in the document. You can modify the function to return a htmltools taglist instead. The above mentioned 3 additional html files for the other types of plots will still be rendered though with default settings. These extra plots can be switched off though.

Usage

1
2
3
4
5
6
f_stat_group_ana(data_ls, col_group, thresh_p_val = 0.05,
  thresh_diff_perc = 3, output_file = "group_ana", static_plots = T,
  alluvial = T, alluvial_thresh_p_val = 0.05,
  alluvial_thresh_diff_perc = 7.5, max_alluvial_flows = 1500,
  tabplot = T, return_taglist = F, fig.width = 16, fig.height = 10,
  quiet = FALSE)

Arguments

data_ls

data_ls object generated by f_clean_data(), or a named list list( data = <dataframe>, numericals = < vector with column names of numerical columns>)

col_group

character vector denoting grouping columns

thresh_p_val

p value threshold for plots, Default: 0.05

thresh_diff_perc

minimum percent difference threshold for plots, Default: 3

output_file

character vector containing output file name

static_plots

boolean, render static plots indicating statistical differences with brackets, Default = TRUE

alluvial

boolean, render alluvial plot, Default: TRUE

alluvial_thresh_p_val

double, threshold for feature to be inlcuded in alluvial plot. Features that are not highly significant and convey a large percental difference will result in a high number of flows thus cluttering the plot. It is not recommended to set these thresholds lower than the default. Default: 0.05

alluvial_thresh_diff_perc

double, threshold for feature to be inlcuded in alluvial plot. Features that are not highly significant and convey a large percental difference will result in a high number of flows thus cluttering the plot. It is not recommended to set these thresholds lower than the default. Default: 7.5

max_alluvial_flows

integer, maximum number of alluvial flows. Alluvial Plots can take a long time to render. Rendering an alluvial plot with the default setting of 1500 should take at least 10 min. Default 1500

tabplot

boolean, render tabplot threshold for features are the same as for the dynamic plots, Default: TRUE , static_plots = T

return_taglist

boolean, return taglist instead of rendereing the final html document and returning the link to the html file. Usefull if analysis should be directly included into the current markdown document.

fig.width

integer Width of Alluvial and Tabplot in inches. Default values can be comfortably viewed on a 1920 x 1080 screen resolution. Default: 16

fig.height

integer height of Alluvial and Tabplot in inches. Default values can be comfortably viewed on a 1920 x 1080 screen resolution. Default: 10

quiet

booloean, suppress render markdown output to console, Default: FALSE

Value

file path to html file / or taglist

See Also

ggplotly tagList,h1,h2

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
 data_ls = f_clean_data(mtcars)
 f_stat_group_ana(data_ls, 'cyl', output_file = 'test_me')
 file.remove('test_me.html')
 file.remove('test_me_stat_plots.html')
 file.remove('test_me_alluvial.html')
 file.remove('test_me_tabplots.html')

## End(Not run)

erblast/oetteR documentation built on May 27, 2019, 12:11 p.m.