This function returns the Spectrum .DP file as a named list of vectors.

read_dp(pjnz, include_raw = FALSE)

Arguments

pjnz

file path to Spectrum PJNZ file.

include_raw

If TRUE, return raw dp data in return list.

Value

List with items: data - Named list of modvars read from DP file dim_vars - Dimensions dp_raw - (optionally) Raw DP data

Examples

pjnz <- system.file(
  "pjnz", "bwa_aim-adult-art-no-special-elig_v6.13_2022-04-18.PJNZ",
  package = "pjnz"
)
dp <- read_dp(pjnz)
#>  Some tags were not found in file:
#>  Tag `AdultNonAIDSExcessMort MV` not found in DP for
#>   `adult_non_aids_excess_mort`, returning `NULL`
#>  Tag `IncidenceInput MV` not found in DP for `incidence_input`, returning
#>   `NULL`
#>  Tag `AdultARTAdjFactor` not found in DP for `adult_art_adj_factor`, returning
#>   `NULL`
#>  Tag `AdultARTAdjFactorFlag` not found in DP for `adult_art_adj_factor_flag`,
#>   returning `NULL`
#>  Tag `AdultPatsAllocToFromOtherRegion` not found in DP for
#>   `adult_pats_alloc_to_from_other_region`, returning `NULL`
#>  Tag `NosocomialInfections MV` not found in DP for `nosocomial_infections`,
#>   returning `NULL`
#> This message is displayed once per session.