plot_rrv: A wrapper function to plot age-specific residual reproductive...

Description Usage Arguments Examples

Description

This function wraps the get_resid_rv function and ggplot2::qplot to plot the residual reproductive value against age for different groups of interest.

Usage

1
2
plot_rrv(df = df_xs, momid = "momid", var, df_ped, evmat, evmat_bak,
  categories = NULL, action = "make.plot", y.lim = NULL)

Arguments

df

A dataframe containing the variables being set for 'id' and 'var'.

momid

The name of the variable for the ID of an individual's mother

var

The variabke by which groups should divided and compared

df_ped

A dataframe

evmat

Event matrix (twins count as one)

evmat_bak

Event matrix (including all twins)

categories

Number of categories

action

Default is "make.plot" to produce a plot on the current device, alternative options are "return.df" for returning a data.frame object containing relevant values or "return.plot" for returning a ggplot2 object.

y.lim

The limits Upppr limit of the y axis

Examples

1
2
3
4
## Not run: 
# TBD

## End(Not run)

johow/kinlab documentation built on July 5, 2019, 4:23 p.m.