plotQQ: Plot Quantile-Quantile chart for all the dataset in one...

Description Usage Arguments Value See Also Examples

View source: R/DatasetComparison.R

Description

Plot Quantile-Quantile chart with Shapiro-Wilk test values and P-values are provided for each dataset. If some of the frequency values (points) are outside the corresponding normal distribution indicated by a shaded area it means that the dataset does not have a normal distribution. All the datasets are plotted into side-by-side in two columns

Usage

1
2
plotQQ(df, condition = "Positive", ds_palette = dataset.colors,
  skip_column = 1, ds_names = NULL, label_x = FALSE)

Arguments

df

Data frame with Feature_name column and feature frequency per dataset

condition

Datasets' class (default: 'Positive' or 'Negative')

ds_palette

Dataset colors (default: dataset.colors)

skip_column

Number of columns skipped (default: 1 [feature name column])

ds_names

Name of the datasets (default: NULL [retrieve from dataframe])

label_x

X axis label (default: FALSE [Add Shapiro normality test])

Value

none

See Also

http://www.sthda.com/english/rpkgs/ggpubr/reference/ggqqplot.html

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library(dsfeatfreqcomp)

# Colors for datasets
dataset.colors <- ggsci::pal_simpsons()(9)
# Swap colors to comply DSA, DS0, DS1, ... order
dataset.colors[c(2,3)] <- dataset.colors[c(3,2)]
dataset.colors[c(1,2)] <- dataset.colors[c(2,1)]

data(dsfeatfreqnegative)
# There is no negative sample for DS5 arrange colors
plotQQ(dsfeatfreqnegative, 'Negative', ds_palette=dataset.colors[c(1:5, 7)])

data(dsfeatfreqpositive)
# For single dataset plot only (y label is normally 'Sample'
# x label is 'Theoretical' in single ggqqplot)
plotQQ(as.data.frame(dsfeatfreqpositive[,2:2]), skip_column= 0, ds_names = 'DS2',
label_x='Theoretical')

gurol/DsFeatFreqComp documentation built on Dec. 30, 2020, 3:36 p.m.