# NOT RUN {
agesFbar(gss)
agesFbar(gss, plot=TRUE)
agesFbar(gss, plot=TRUE, main="Greater silver smelt in 5b and 6a")
# 50% coverage instead of 80%
agesFbar(gss, c(0.25, 0.75))
# Include only the last 20 years
agesFbar(tail(gss, 20))
# Tests
cn1 <- setNames(c(100,400,400,100), 3:6)
cn2 <- setNames(c(99,401,401,99), 3:6)
cn3 <- setNames(c(101,399,399,101), 3:6)
cn4 <- setNames(c(500,400,50,50), 3:6)
cn5 <- setNames(c(50,50,400,500), 3:6)
agesFbar(cn1)
agesFbar(cn2)
agesFbar(cn3)
agesFbar(cn4)
agesFbar(cn5)
# }
Run the code above in your browser using DataLab