Skip to content

Commit

Permalink
ICD10 mapping data update
Browse files Browse the repository at this point in the history
  • Loading branch information
yijutseng committed Jul 17, 2022
1 parent 1c57c26 commit 0134f53
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 26 deletions.
12 changes: 6 additions & 6 deletions .Rhistory
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
ctrlN <- sum(grepl("non",groupedDataWide$Group))
caseDataLong <- groupedDataLong[!grepl("non|[*]",groupedDataLong$Group),][,Percentage := round((N/caseN)*100,2)]
ctrlDataLong <- groupedDataLong[grepl("non",groupedDataLong$Group),][,Percentage := round((N/ctrlN)*100,2)]
for(cat in 1:nrow(caseDataLong)){
if(caseDataLong$Percentage[cat] >= limitFreq | ctrlDataLong$Percentage[cat] >= limitFreq){
Table <- matrix(c(caseDataLong$N[cat], ctrlDataLong$N[cat],
caseN - caseDataLong$N[cat], ctrlN - ctrlDataLong$N[cat]), 2)
if(sum(Table < 5) < 1 && sum((chisq.test(Table, simulate.p.value = TRUE)$expected) < 5) < 1){
Test_pvalue[length(Test_pvalue)+1] <- chisq.test(Table, correct = FALSE)$p.value < pvalue
Expand Down Expand Up @@ -510,3 +504,9 @@ library(roxygen2)
roxygenise()
library(pkgdown)
build_site()
load("~/Documents/GitHub/dxpr/data/ICD10DxwithTwoFormat.rda")
View(ICD10DxwithTwoFormat)
ICD10DxwithTwoFormat<-unique(ICD10DxwithTwoFormat)
save(ICD10DxwithTwoFormat,file="ICD10DxwithTwoFormat.rda")
load("~/Documents/GitHub/dxpr/data/ICD10DxwithTwoFormat.rda")
View(ICD10DxwithTwoFormat)
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ inst/doc
doc
Meta
.Rproj.user
.Rhistory
Binary file modified data/ICD10DxwithTwoFormat.rda
Binary file not shown.
40 changes: 20 additions & 20 deletions dxpr.Rproj
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
Version: 1.0
RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default
EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8
RnwWeave: Sweave
LaTeX: pdfLaTeX
AutoAppendNewline: Yes
StripTrailingWhitespace: Yes
BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
Version: 1.0

RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8

RnwWeave: Sweave
LaTeX: pdfLaTeX

AutoAppendNewline: Yes
StripTrailingWhitespace: Yes

BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source

0 comments on commit 0134f53

Please sign in to comment.