plot_curves_faceted: Plot relationship between two variables faceted by K (rows)...

Description Usage Arguments Value Examples

View source: R/forecastingplots.R

Description

Plot relationship between two variables faceted by K (rows) and combinations of other parameters (columns)

Usage

1
2
3
4
plot_curves_faceted(df, num_parameters, x_var = "gen_adj",
  y_var = "NumCells", log = NA, xlimits = NULL, ylimits = NULL,
  line_col = "#00000005", alpha = 0.1, xintercept = NA,
  output_filename = NA, file_type = "png", output_dir = NA)

Arguments

df

data frame

num_parameters

number of parameters, accounting for the first set of columns in the dataframe

x_var

column name of the x-variable (default "gen_adj")

y_var

column name of the y-variable (default "NumCells")

log

if this contains "x" (resp "y") then x-axis (resp y-axis) will be log-transformed (default NA)

xlimits

limits for x-axis

ylimits

limits for y-axis

line_col

line colour or column name of variable to colour by

alpha

line transparency level (if line_col is not specified)

xintercept

position of vertical dashed line (default NA means no line)

output_filename

name of output image file

file_type

either "pdf" or "png" (other values default to "pdf")

output_dir

folder in which to save the image file; if NA then plots are displayed on screen instead

Value

a plot object

Examples

1
2
plot_curves_faceted(data, 16)
plot_curves_faceted(data, 16, x_var = "Generation", y_var = "MeanBirthRate")

robjohnnoble/demonanalysis documentation built on June 30, 2020, 12:47 a.m.