plot_correlation: Plot the correlation between mating/reproductive success and...

Description Usage Arguments Value See Also Examples

View source: R/correlations.R

Description

This function creates a plot of the correlations using the package ggplot2.

Usage

1
2
3
4
5
6
7
8
9
plot_correlation(
  data,
  x,
  y,
  xlab = "x-axis title",
  ylab = "y-axis title",
  y_limits = NULL,
  x_limits = NULL
)

Arguments

data

A dataframe containing the data to be processed.

x

The name of the x covariate.

y

The name of the y covariate.

xlab

A title for the x-axis.

ylab

A title for the y-axis.

y_limits

The limit for the y-axis of the plot.

x_limits

The limit for the x-axis of the plot.

Value

A ggplot object.

See Also

figure_correlations

Examples

1
2
3
plot_correlation(data = males,
                 x = 'Ter_map', y = 'Mat_succ',
                 xlab = 'x-axis title', ylab = 'y-axis title')

courtiol/matingRhinos documentation built on Nov. 22, 2019, 11:10 p.m.