calc_prev: Calculate prevalence from 'cow_table' or a csv file

Description Usage Arguments Value

View source: R/post_simulation_process.R

Description

Calculate monthly prevalences 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
calc_prev(
  param,
  output_filename = param$output_filename,
  output_dir = param$output_dir,
  i_simulation = seq_len(param$n_simulation),
  list_cows = NULL,
  type = c("prop", "count", "status", "route"),
  gather = T,
  drop = T,
  by_simulation = F
)

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.

type

prop means proportion of infected cows. count means the number of infected and non-infected cows. status means the number of s (non-infected), ial (asymptomatic), ipl (persistent lymphositosis) and ebl cows. route means the number of infected cows by each infection route.

gather

When type is "route", whether infection routes as "tie_exposed_baseline", "tie_exposed_risk", "tie_non_exposed" and "free" should be gathered to one category "insects" or treated as-is.

by_simulation

Whether calculate median of all simulations (FALSE) or calculate by each simualtion (TRUE).

Value

A data.table contains monthly prevalences.


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