if (FALSE) {
# example using a model for the minke data
data(minke)
# fit a model
result <- ds(minke, formula=~Region.Label)
# make a base plot, showpoints=FALSE makes the plot less busy
plot(result, showpoints=FALSE)
# add lines for sex one at a time
add_df_covar_line(result, data.frame(Region.Label="South"), lty=2)
add_df_covar_line(result, data.frame(Region.Label="North"), lty=3)
# add a legend
legend(1.5, 1, c("Average", "South", "North"), lty=1:3)
# point transect example
data(amakihi)
result <- ds(amakihi, truncation=150, transect="point", formula=~OBs)
plot(result, showpoints=FALSE, pdf=TRUE)
add_df_covar_line(result,
data.frame(OBs=na.omit(unique(amakihi$OBs))), pdf=TRUE)
}
Run the code above in your browser using DataLab