boxMANA: Boxplot of resampled results

View source: R/boxMANA.R

boxMANAR Documentation

Boxplot of resampled results

Description

A simple boxplot function for bootstrap and jackknife resampled results of additive genetic, non-additive genetic, and maternal variance components.

Usage

boxMANA(comp, type = "perc", ymax = NULL, ymin = NULL, yunit = NULL, leg = "topright",
cex_ylab = 1, cex_yaxis = 1, cex_names = 1)

Arguments

comp

Data frame of bootstrap or jackknife resampling results.

type

Default is "perc" for percentage values of variance components. Other option is "raw" for raw values of variance components.

ymax

Maximum value of the y-axis.

ymin

Minimum value of the y-axis.

yunit

Unit increment of the y-axis.

leg

Position of the simple legend.

cex_ylab

Magnification of the y-axis label.

cex_yaxis

Magnification of the y-axis units.

cex_names

Optional magnification of trait labels.

Details

Plots an R boxplot. Uses an object produced by any of the bootstrap resampling functions, i.e. resampLmer, resampLmer2, resampLmer3, resampGlmer, resampGlmer2, and resampGlmer3. Or any of the jackknife resampling functions, i.e. JackLmer, JackLmer2, JackLmer3, JackGlmer, JackGlmer2, and JackGlmer3. Produces a simple legend.

Examples


##Import bootstrap resampled data model results
data(chinook_bootL) #Chinook salmon length
boxMANA(comp=chinook_bootL) #Default plot
boxMANA(comp=chinook_bootL,yunit=20,ymax=100,cex_ylab=1.3,leg="topleft")

##Group length and survival together in the same plot
data(chinook_bootS) #Chinook salmon survival
chinook_bootL$trait<- "length"; chinook_bootS$trait<- "survival"
comb_boot<- rbind(chinook_bootL[,-2],chinook_bootS) #remove 'tray'
comb_boot$trait<- as.factor(comb_boot$trait)
#
boxMANA(comp=comb_boot) #Default plot
boxMANA(comp=comb_boot,yunit=20,ymax=100,cex_ylab=1.3)

fullfact documentation built on May 29, 2024, 1:21 a.m.