boxplots_with_checks: Boxplots with checks alongside the boxes

Description Usage Arguments Value Author(s) Examples

Description

Create boxplots for a sequence of traits for each level of a grouping factor.

Usage

1
2
3
boxplots_with_checks(x, traits, factor, checks = NULL, checks_factor = NULL,
  plottype = "Boxplot", boxcolor = "white", stripcolor = "red",
  checks.color = "blue", legend = TRUE, trim.labels = NULL, ...)

Arguments

x

A data frame containing at least the columns trait and factor and also checks and checks_factor if both specified.

traits

Charachter vector with the column names in data of the traits to be plotted.

factor

Character string with the column name in data of the factor by which to plot the trait.

checks

(Optional) Charachter vector with the names of the checks in the checks_factor column.

checks_factor

(Optional) Charachter string with the column name in data of the factor that contains the observations to be plotted as checks.

plottype

(Optional) Character string speciyfing which type of plot to produce, should be either "Boxplot" or "Stripplot". Default = "Boxplot".

boxcolor

(Optional) Character vector specifying the color(s) for the boxplots. Default = "white".

stripcolor

(Optional) Character vector specifying the color(s) for the points in the stripplot. Default = "red".

checks.color

(Optional) Character string specifying the color(s) for the checks. Default = "blue".

legend

(Optional) Logical indicating whether a legend for the checks should be added to the plot. Default = TRUE.

trim.labels

(Optional) Numeric value specifying how many characters of the levels of factor should be plotted on the X-axis. If NULL, the levels are plotted as they are in x. Default = NULL.

...

Extra graphical parameters for the plot-function.

Value

Plot is submitted to the graphical device.

Author(s)

Ruud Derijcker, Katrien Baert

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(exampleCV)
exampleCV$CHECK <- sample(c(rep(0, 300),
sample(c(1:4), nrow(exampleCV), 20)), 100)
exampleCV$EXPT <- exampleCV$BLOCK <- NA
colnames(exampleCV)[colnames(exampleCV)== "trait"] <- "dummy"
exampleCV$dummy <- abs(exampleCV$dummy)*100
trait <- "dummy"
boxplots_with_checks(x=exampleCV, traits="dummy", factor="LOCATION",
      checks=exampleCV$GERMPLASM[exampleCV$CHECK!=0],
      checks_factor = "GERMPLASM", checks.color = "grey",
     boxcolor="blue", main="Yield by location\n(all checks)")

digiYozhik/msc_thesis documentation built on May 14, 2019, 5:16 p.m.