GraphCompare: Function to Produce Boxplots

Description Usage Arguments Value Author(s) See Also Examples

Description

This function takes a list created by either SubsetCleaner or DataCleaner and graphs boxplots for each of the fact levels.

Usage

1
2
GraphCompare(data, groups = FALSE, clean_bg = TRUE, x_label, y_label, 
             bold_labels = FALSE, vert_facet = TRUE)

Arguments

data

Is a list output from either SubsetCleaner or DataCleaner

groups

Either TRUE or FALSE. If data came from SubsetCleaner then this value needs to be set to TRUE. If data came from DataCleaner then this value needs to be set to FALSE. The default is FALSE.

clean_bg

Either TRUE or FALSE. IF TRUE then the background of the graph will be white. The default is TRUE.

x_label

X axis label.

y_label

Y axis label.

bold_labels

Either TRUE or FALSE. The default is FALSE. Bolds the axes labels.

vert_facet

Either TRUE or FALSE. The default is TRUE. If groups=TRUE then this determines whether the subgroupings are separated and graphed vertically (TRUE) or horizontally (FALSE).

Value

A graph is returned.

Author(s)

Selina A. Ruzi

See Also

SubsetCleaner DataCleaner ggplot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## -- find path
mypath <- system.file("extdata", "Example_data.csv", package="multipleComparisons")

## -- read in data
Example_data <- read.csv(mypath, header=TRUE)
names(Example_data)

## -- If do not want to further subset the data, do the following
myCleanData <- DataCleaner(Example_data, fact="Plot", 
respo="Seed_removal_percent", 
warn=FALSE)

MyDataGraph <- GraphCompare(myCleanData, groups=FALSE, clean_bg=TRUE, x_label="Plot",
                            y_label ="Seed Removal Percent", bold_labels=TRUE)
MyDataGraph


## -- Subsetting Example
myCleanSubset <- SubsetCleaner(Example_data, fact="Plot", respo="Seed_removal_percent", 
                        sub ="Season", warn=FALSE)

MySubsetGraph <- GraphCompare(myCleanSubset, groups=TRUE, clean_bg=TRUE, x_label="Plot",
                              y_label="Seed Removal Percent", bold_labels=TRUE, 
                              vert_facet=TRUE)
MySubsetGraph

sruzi24/multiple_comparisons documentation built on May 15, 2019, 5:03 a.m.