Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add [.icd9cm_pc and [.icd10cm_pc methods #199

Open
dapritchard opened this issue Apr 14, 2020 · 0 comments
Open

Add [.icd9cm_pc and [.icd10cm_pc methods #199

dapritchard opened this issue Apr 14, 2020 · 0 comments

Comments

@dapritchard
Copy link

Since extraction methods aren't defined for icd9cm_pc and icd10cm_pc classes, extraction resorts to the default method which drops all of the type encoding information. See the following for an example.

library(icd)
z = as.short_diag(as.icd9cm_pc(c("0053", "0053", "0211")))

z
#> [1] "0053" "0053" "0211"
#> attr(,"class")
#> [1] "icd9cm_pc" "character"
#> attr(,"icd_short_diag")
#> [1] TRUE

z[1L]
#> [1] "0053"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant