plot_trajectories: Plot SARS-CoV-2(+) trajectories

Description Usage Arguments Value Author(s) Examples

View source: R/plot_trajectories.R

Description

This function plots the temporal tendencies in #SARS-CoV-2(+) and its proportional abundance each log-transformed data and insets with corresponding non-transformed data.

Usage

1
2
3
4
5
6
7
8
9
plot_trajectories(
  inc.df,
  propab.df,
  disease,
  plot.inc = TRUE,
  plot.propab = TRUE,
  saveplots = TRUE,
  saveplots.ext = ".png"
)

Arguments

inc.df:

dataframe. The incidence dataframe.

propab.df:

dataframe. The proportional abundance dataframe. #' @param disease: *character*. Name of the disease. It will apply if the plots are saved.

plot.inc:

TRUE or FALSE. Plot incidence trajectory. Default TRUE.

plot.propab:

TRUE or FALSE. Plot proportional abundance trajectory. Default TRUE.

saveplots:

TRUE or FALSE. Save the plots in your wd.Default TRUE.

saveplots.ext:

character. The extension for the saved figures admitted by ggsave (e.g., ".png", ".svg").Default ".png".

Value

This function returns to your global environment an object list named plotTraj with the plot(s) created. Also, if saveplots is TRUE, a folder named plots is created in your wd.

Author(s)

Simon P Castillo spcastil@uc.cl.

Examples

1
plot_trajectories(inc.df=inc_df, propab.df=propab_df, plot.inc=TRUE, plot.propab=TRUE, saveplots= TRUE, saveplots.ext= ".png")

simonpcastillo/CPAD documentation built on Dec. 31, 2020, 7:27 a.m.