DHLab-TSENG / dxpr

Other
20 stars 3 forks source link

selectCases error 找不到物件 'ICD9DxwithTwoFormat'` #29

Closed yijutseng closed 4 years ago

yijutseng commented 4 years ago

NASHFactIcdDataDF<-readRDS("NASHFactIcdDataDFTest.rds") NASHICDGrepl<-"^K75.81|^571.8|^571.9|^K76.0" Case <- emr::selectCases(dxDataFile = NASHFactIcdDataDF, idColName = IndividualId,
icdColName = Icd,
dateColName = DateServiceStarted, icdVerColName = IcdVersion, groupDataType = ICD, caseCondition = NASHICDGrepl, caseCount = 3, periodRange = c(30,365), caseName = "NASH")

錯誤訊息 Error in merge(icd_Decimal[Version == 9], ICD9DxwithTwoFormat, by.x = "ICD", : 找不到物件 'ICD9DxwithTwoFormat'

yijutseng commented 4 years ago

sessionInfo()

R version 3.6.3 (2020-02-29) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale: [1] LC_COLLATE=Chinese (Traditional)_Taiwan.950 LC_CTYPE=Chinese (Traditional)_Taiwan.950
[3] LC_MONETARY=Chinese (Traditional)_Taiwan.950 LC_NUMERIC=C
[5] LC_TIME=Chinese (Traditional)_Taiwan.950

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] data.table_1.12.8 tidyr_1.0.2 ggplot2_3.3.0 lubridate_1.7.4 dplyr_0.8.5

loaded via a namespace (and not attached): [1] Rcpp_1.0.3 rstudioapi_0.11 magrittr_1.5 tidyselect_1.0.0 munsell_0.5.0 colorspace_1.4-1 [7] R6_2.4.1 rlang_0.4.5 stringr_1.4.0 tools_3.6.3 grid_3.6.3 gtable_0.3.0
[13] withr_2.1.2 assertthat_0.2.1 tibble_2.1.3 lifecycle_0.2.0 crayon_1.3.4 purrr_0.3.3
[19] vctrs_0.2.4 glue_1.3.2 stringi_1.4.6 emr_0.2.0 compiler_3.6.3 pillar_1.4.3
[25] scales_1.1.0 pkgconfig_2.0.3

mircyam commented 4 years ago

emr package includes not only functions but also rds files. Using double colon marks (emr::function) to call exported functions may cause the situation of "object not found" since other objects may be not exported from the namespace.

Loading full emr package is recommended.