Learn R Programming

icd (version 4.0.6)

generate_neds_pts: Generate simulated 'NEDS' data for 'PCCC' and bigger wide data testing

Description

Generate simulated 'NEDS' data for 'PCCC' and bigger wide data testing

Usage

generate_neds_pts(n = 1000L, ncol = 20L, icd10 = TRUE,
  verbose = FALSE)

Arguments

n

Integer number of rows of data to generate

ncol

Integer number of diagnostic code columns, default of 20 matches NEDS

icd10

Logical, default TRUE to sample ICD-10-CM codes. FALSE gives ICD-9

verbose

single logical value, defaults to FALSE in most functions.

Examples

Run this code
# NOT RUN {
summary(icd::comorbid_pccc_dx(icd:::generate_neds_pts()))
neds <- icd:::generate_neds_pts(n = 100, ncol = 10L, icd10 = FALSE)
stopifnot(dim(neds) == c(100L, 11L))
summary(icd::comorbid_pccc_dx(neds))
# }
# NOT RUN {
# original size data for PCCC benchmarking:
set.seed(1441)
# Large NEDS simulation: neds <- icd:::generate_neds_pts(28584301L)
neds <- icd:::generate_neds_pts(2858L)
neds_comorbid <- icd::comorbid_pccc_dx(neds)
# }

Run the code above in your browser using DataLab