PlotHHxSpecies {capm}R Documentation

Distribution of households according to the number of inhabitants one or more species

Description

Dodged bar plot of the distribution of households according to the number of inhabitants of one or more species.

Usage

PlotHHxSpecies(dat = NULL, species = NULL, proportion = TRUE,
  x.label = "Individuals per household",
  y.label = "Proportion of households", legend = TRUE)

Arguments

dat

data.frame with households as observation unit and columns with the number of individuals of the species of interest.

species

names or positions of columns with species data.

proportion

logical. If TRUE (default), the y axis will represent proportions, if FALSE, it would represent raw counts.

x.label

title for x axis.

y.label

title for y axis.

legend

logical. If TRUE (default), the legend will be showed, if FALSE, it will be removed.

References

Baquero, O. S., Marconcin, S., Rocha, A., & Garcia, R. D. C. M. (2018). Companion animal demography and population management in Pinhais, Brazil. Preventive Veterinary Medicine.

See Also

geom_bar.

Examples

data(cluster_sample)
PlotHHxSpecies(cluster_sample, c("number_of_persons",
                                 "number_of_dogs",
                                 "number_of_cats"))


[Package capm version 0.14.0 Index]