Learn R Programming

vectorsurvR (version 1.5.0)

getVectorIndex: Calculate vector index

Description

`getVectorIndex()` Calculates vector index from pools and collections data

Usage

getVectorIndex(
  collections,
  pools,
  interval,
  target_disease,
  pt_estimate,
  scale = 1000,
  agency = NULL,
  species = NULL,
  trap = NULL,
  sex = NULL,
  trapnight_min = 1,
  trapnight_max = NULL,
  separate_by = NULL
)

Value

Dataframe containing the vector index calculation

Arguments

collections

Collections data retrieved from `getArthroCollections()`

pools

Pools data retrieved from `getPools()`

interval

Calculation interval for vector index, accepts “collection_date”,“Biweek”,“Week”, and “Month

target_disease

The disease to calculate infection rate for–i.e. “WNV”. Disease acronyms are the accepted input. To see a list of disease acronyms, run `unique(pools$target_acronym)`

pt_estimate

The estimation type for infection rate. Options include: “mle”,“bc-”mle”, “mir”

scale

Constant to multiply infection rate, default is 1000

agency

An optional vector for filtering agency by character code

species

An optional vector for filtering species. Species_display_name is the accepted notation.To see a list of species present in your data run unique(collections$species_display_name). If species is unspecified, the default NULL will return data for all species in data.

trap

An optional vector for filtering trap type by acronym. Trap_acronym is the is the accepted notation. Run unique(collections$trap_acronym) to see trap types present in your data. If trap is unspecified, the default NULL will return data for all trap types.

sex

An optional vector for filtering sex type. Accepts 'male', 'female',or 'other'. If sex is unspecified, the default NULL will return data for female sex.

trapnight_min

Minimum trap night restriction for calculation. Default is 1.

trapnight_max

Maximum trap night restriction for calculation. Default is no restriction.

separate_by

Separate/group the calculation by 'trap','species' or 'agency'. Default NULL does not separate.

Examples

Run this code
getVectorIndex(collections=sample_collections,
pools=sample_pools, interval="Month", target_disease = "WNV", pt_estimate="mle")

Run the code above in your browser using DataLab