Learn R Programming

heplots (version 1.6.2)

peng: Size measurements for adult foraging penguins near Palmer Station, Antarctica

Description

Data originally from palmerpenguins. Includes measurements for penguin species, island in Palmer Archipelago, size (flipper length, body mass, bill dimensions), and sex.

Usage

peng

Arguments

Format

A tibble with 333 rows and 8 variables:

species

a factor denoting penguin species ("Adélie", "Chinstrap" or "Gentoo")

island

a factor denoting island in Palmer Archipelago, Antarctica ("Biscoe", "Dream" or "Torgersen")

bill_length

a number denoting bill length (millimeters)

bill_depth

a number denoting bill depth (millimeters)

flipper_length

an integer denoting flipper length (millimeters)

body_mass

an integer denoting body mass (grams)

sex

a factor denoting penguin sex ("f", "m")

year

an integer denoting the study year (2007, 2008, or 2009)

Details

In this version, variable names have been shortened (removing units) and observations with missing data have been removed.

Examples

Run this code
data(peng)
# Covariance ellipses, centered, first two variables
covEllipses(cbind(bill_length, bill_depth) ~ species, data=peng,
     center=TRUE, 
     fill=c(rep(FALSE,3), TRUE), 
     fill.alpha=.1, label.pos=c(1:3,0))

# All pairs when more than two variables are specified. They look pretty similar
covEllipses(peng[,3:6], peng$species, 
            variables=1:4, 
            fill=c(rep(FALSE,3), TRUE), 
            fill.alpha=.1)
            
# Box's M test 	
peng.boxm <- boxM(cbind(bill_length, bill_depth, flipper_length, body_mass) ~ species, data=peng)
peng.boxm
plot(peng.boxm, gplabel="Species")

# Fit MANOVA model, predicting species 
peng.mod0 <-lm(cbind(bill_length, bill_depth, flipper_length, body_mass) ~
               species, data=peng)
car::Anova(peng.mod0)

# HE plot
heplot(peng.mod0, fill=TRUE, fill.alpha=0.1, 
       size="effect",
       xlim=c(35,52), ylim=c(14,20))

Run the code above in your browser using DataLab