barplot_ts_sex: Create a barplot of the number of individuals of each sex in...

barplot_ts_sexR Documentation

Create a barplot of the number of individuals of each sex in time series

Description

This function produces a barplot showing the number of individuals of each sex in a time series. To do this, the function takes in a dataframe which contains a column distinguishing individuals and a column defining their sex, which are specified as character strings. The function then identifies the sex of each unique individual, sums the number of individuals of each sex and produces a barplot. This function is primarily intended for use in GAMS4DTS.

Usage

barplot_ts_sex(
  dat,
  id_column = "individual",
  f_column = "sex",
  cex.axis = 1,
  cex = 1
)

Arguments

dat

A dataframe which contains a column which defines unique individuals and a column which defines their sex. Multiple observations from the same individual are supported because the function obtains the sex of each unique individual once.

id_column

A character input which defines the name of the column in dat which distinguishes individuals.

f_column

A character input which defines the name of the column in dat which defines the sex of each individual.

cex.axis

A number which defines the font size for axis tick labels.

cex

A number which defines the font sizes for axis labels.

Value

The function returns a pre-customised barplot showing the number of individuals of each sex in a dataframe.

Author(s)

Edward Lavender


edwardlavender/Tools4ETS documentation built on Nov. 29, 2022, 7:41 a.m.