boxplotZoo: Boxplots of treatments over phases in feed trial

Description Usage Arguments Value Examples

View source: R/boxplotZoo.R

Description

Boxplots of treatments over phases in feed trial

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
boxplotZoo(
  data,
  var,
  treatment = "behandeling1",
  group1 = "faseW",
  group2 = "ronde",
  group3 = NULL,
  lab = "Treatment",
  lab2 = "Round",
  pen = "hok",
  xlab,
  ylab,
  colours = brewer.pal(length(unique(data[, get(treatment)])), "Set3")
)

Arguments

data

data.table

var

character name of zootechnical parameter of interest

treatment

character name of treatment variable (default= "behandeling1")

group1

character name of grouping variable 1 (default= "faseW")

group2

character name of grouping variable 2 (default= "ronde")

group3

character name of grouping variable 1 (default= NULL)

lab

character name to be used in legend for grouping variable 1 (default = "Treatment")

lab2

character name to be used in legend for grouping variable 2 (default = "Round")

pen

character name for pen variable (default= "hok")

xlab

character label for x-axis

ylab

character label for y-axis

colours

character vector names for colours for each treatments (defaults to selection of n(treatment) colours from "Set3" of RColorBrewer palette)

Value

plot

Examples

1
2
groeidataLong <- makeLong(groeidata,2)
boxplotZoo(data=groeidataLong,var="Weight",xlab="Treatment groups per phase",ylab= "Weight (kg)")

DataZhukov/animalTrial documentation built on Dec. 17, 2021, 4:08 p.m.