plot_route: Plot monthly infection routes nicely

Description Usage Arguments Value

View source: R/post_simulation_process.R

Description

Plot average (median) monthly prevalences by each infection route from csv files or list of cow_table. Set either one of output_dir+output_filename or csv.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
plot_route(
  param,
  output_filename = param$output_filename,
  output_dir = param$output_dir,
  i_simulation = seq_len(param$n_simulation),
  list_cows = NULL,
  language = "English",
  drop = T,
  route_levels = NULL,
  route_labels = NULL,
  gather = T,
  max_ylim = NULL,
  title = T,
  legend_title = T,
  xlab = T,
  ylab = T,
  gray = F,
  area_color = NULL,
  border = F,
  border_color = NULL,
  font = NULL
)

Arguments

param, output_filename, output_dir

See param.

i_simulation

csvs with this numbers are used.

list_cows

List consisted of cow_tables. Specify one of output_dir+output_filename or list_cows.

language

Language to which translate messages. At present, only English and Japanese is implemented.

drop

Drop infection routes not in csv or cows from a legend.

route_levels, route_labels, gather

See redefine_route_levels

max_ylim

Upper limit of the y-axis of the plot.

title, legend_title, xlab, ylab

logical or character. Plot a title, a legend title, a label for x-axis and a label for y-axis. When TRUE, the default value is used. When FALSE or NULL, the title or the label is not shown. When specified by character, the string is used as the title or the label.

gray

When TRUE, a plot will be a grayscale image.

area_color

Specify a color palette of a plot.

border

When TRUE, each area in a plot will be surrounded by border.

border_color

Specify a color palette for the border.

font

Font in a plot. The default is "Meiryo" for Windows and "Hiragino Kaku Gothic Pro W3" for the other OS.

Value

A ggplot2::ggplot plot.


fmsan51/blvibmjp documentation built on Sept. 2, 2020, 9:04 p.m.