library(apyramid)
library("apyramid")
library("ggplot2") # load ggplot2 to control plot aesthetics
library("outbreaks") # load the outbreaks package for linelist data
old_theme <- theme_set(theme_classic(base_size = 18))
autocut <- function(x) {
cut(x, breaks = pretty(x), right = TRUE, include.lowest = TRUE)
}
library(data.table)
setwd("C:/Users/s-das/Syncplicity/MyProjects_IMP/MY_Papers_V2/TRB 2021/EScotter_BayesianRule/")
it01 <- read.csv("EScotter_Fin2a.csv", header=T, na.strings=c("","NA"))
mn01 <- it01[, c("SEVERITY_CD", "DR_SEX", "DR_AGE")]
mn02= mn01[complete.cases(mn01),]
dim(mn02)
## [1] 491 3
## [1] 574 3
## SEVERITY_CD DR_SEX DR_AGE
## 1 C F 28
## 2 C M 34
## 3 D F 23
## 4 D F 18
## 5 D M 33
## 6 C M 36
## [1] 476 4
## SEVERITY_CD DR_SEX DR_AGE age_group
## 1 C F 28 (20,40]
## 2 C M 34 (20,40]
## 3 D F 23 (20,40]
## 4 D F 18 [0,20]
## 5 D M 33 (20,40]
## 6 C M 36 (20,40]