weavers: Weaver Moult Data

weaversR Documentation

Weaver Moult Data

Description

Weaver moult data from the Western Cape, South Africa

Usage

data(weavers)

Format

A data frame with 7543 observations on the following 4 variables.

RDate

a character vector with dates on which individuals were caught, format: yyyy-mm-dd.

Sex

a numeric vector, 0 = unknown, 1 = male, 2 = female, 3 = possibly male, 4 = possibly female.

Year

year in which individual was caught.

Moult

a character vector with moult scores for individual primary feathers, either nine or ten, starting with innermost primary feather. 0: old feather, 5: new feather, 1 to 4, feathers at various stages of growth in between.

Source

Oschadleus, D. (2005). Patterns of primary moult in weavers. PhD Thesis. University of Cape Town.

SAFRING, URL: https://safring.birdmap.africa/

Examples

data(weavers)

mscores <- substr(weavers$Moult, 1, 9)

## convert moult scores to proportion of feather mass grown
feather.mass <- c(10.4, 10.8, 11.5, 12.8, 14.4, 15.6, 16.3, 15.7, 15.7)
weavers$pfmg <- ms2pfmg(mscores, feather.mass)

## days since 1 August
weavers$day <- date2days(weavers$RDate, dateformat = "yyyy-mm-dd", startmonth = 8)
ssex <- ifelse(weavers$Sex == 1 | weavers$Sex == 3, "male", 
  ifelse(weavers$Sex == 2 | weavers$Sex == 4, "female", NA))
weavers$ssex <- as.factor(ssex)

## moult model with duration and mean start date depending on sex
mmf <- moult(pfmg ~ day | ssex | ssex, data = weavers, type = 3)
summary(mmf)

## predict duration and start of moult (then both) for males and females
ssex <- c("male", "female") 
day <- 150
(p1 <- predict.moult(mmf, newdata = data.frame(day, ssex), predict.type = "duration"))
(p2 <- predict.moult(mmf, newdata = data.frame(day, ssex), predict.type = "start"))
(p3 <- predict.moult(mmf, newdata = data.frame(day, ssex), predict.type = "both"))


moult documentation built on Aug. 30, 2022, 9:06 a.m.