plot_hist: Plotting Histograms

View source: R/plotting.R

plot_histR Documentation

Plotting Histograms

Description

The function produces histogram plots for each grouping varibale 1 and 2 combinations (Factor1 and Factor2). In addition a Shapiro-Wilk test of normaility is performed and p-value is plotted in the subtititle of the plots. Also there is colour coding - green = normaly distributed according to Shapiro-Wilk test; red = not normaly distributed according to Shapiro-Wilk test

Usage

plot_hist(root_norm, draw_out = F, file = "data_distribution.pdf")

Arguments

root_norm

data.frame; normalized Rootdetection data set

draw_out

logical; TRUE = prints plot in pdf file, FALSE = no pdf output

file

string; filename of the pdf output

Value

list; containg the p-values of shapiro-wilk test for each element

Examples

# produce list of plots:

root_norm <- norm_10mm_standard(root_output)
histograms <- plot_hist(root_norm, draw_out = FALSE)
# view the first plot in R:
histograms[[1]]

# produce list of plots and print as pdf
root_norm <- norm_10mm_standard(root_output)
histograms <- plot_hist(root_norm, draw_out = TRUE, file = "test_plot_histograms.pdf")
# view the first plot in R:
histograms[[1]]

PhilippJanitza/rootdetectR documentation built on Feb. 24, 2024, 6:46 a.m.