R/birdstate.R

Defines functions birdstate

Documented in birdstate

# function to create a variable that indicates whether a bird was alive or dead
# at the time of reencounter
birdstate <- function(x){
  # x     condition (numeric code) as given by EURING
  livemat<-data.frame(condition=0:9, 
                      livestate=c("unknown", "dead", "dead", "dead", "sick", "sick", "alive", "alive", "alive", "alive"))
  state <- livemat$livestate[match(x, livemat$condition)]
  return(state)
}

Try the birdring package in your browser

Any scripts or data that you put into this service are public.

birdring documentation built on Oct. 7, 2023, 5:07 p.m.