df<-read.csv("https://raw.githubusercontent.com/tmatis12/datafiles/refs/heads/main/RadDat_CareOne.csv")
head(df)
## Unique.Identifier PatientAge Radiology.Technician
## 1 1 75 65
## 2 2 87 65
## 3 3 35 16
## 4 4 51 24
## 5 5 67 37
## 6 6 54 7
## CatalogCode In.Rad.Room Ordering.Physician
## 1 DX Abdomen 2 vw w/single chest 1 4
## 2 DX Abdomen 2 vw w/single chest 1 4
## 3 DX Abdomen 2 vw w/single chest 1 150
## 4 DX Abdomen 2 vw w/single chest 1 130
## 5 DX Abdomen 2 vw w/single chest 1 173
## 6 DX Abdomen 2 vw w/single chest 1 349
## PatientTypeMnemonic Encounter.Type Priority OrderDateTime
## 1 IP Inpatient Routine 12/27/16 10:32
## 2 IP Inpatient Routine 1/13/17 11:44
## 3 IP Inpatient Routine 1/2/17 17:19
## 4 IP Inpatient Routine 11/13/16 10:13
## 5 IP Inpatient STAT 12/13/16 3:22
## 6 IP Inpatient Routine 1/17/17 5:38
## ExamCompleteDateTime FinalDateTime Loc.At.Exam.Complete
## 1 12/27/16 11:19 12/28/16 14:32 GTU
## 2 1/13/17 12:32 1/14/17 16:00 GTU
## 3 1/2/17 18:00 1/3/17 7:44 3W
## 4 11/14/16 9:34 11/14/16 16:40 4W
## 5 12/13/16 4:04 12/13/16 3:19 Emergency Ctr
## 6 1/17/17 7:47 1/17/17 10:55 3E
## Exam.Completed.Bucket Section Exam.Room
## 1 8a-8p DX DX Rm 1
## 2 8a-8p DX DX Rm 1
## 3 8a-8p EC DX DX Rm 5 (EC)
## 4 8a-8p DX DX Rm 1
## 5 12a-8a EC DX DX Rm 5 (EC)
## 6 12a-8a DX DX Portable
we would like to keep only the colnams with patient age and priority
df2<-data.frame(df$PatientAge,df$Priority)
colnames(df2)<-c("PatientAge","Priority")
head(df)
## Unique.Identifier PatientAge Radiology.Technician
## 1 1 75 65
## 2 2 87 65
## 3 3 35 16
## 4 4 51 24
## 5 5 67 37
## 6 6 54 7
## CatalogCode In.Rad.Room Ordering.Physician
## 1 DX Abdomen 2 vw w/single chest 1 4
## 2 DX Abdomen 2 vw w/single chest 1 4
## 3 DX Abdomen 2 vw w/single chest 1 150
## 4 DX Abdomen 2 vw w/single chest 1 130
## 5 DX Abdomen 2 vw w/single chest 1 173
## 6 DX Abdomen 2 vw w/single chest 1 349
## PatientTypeMnemonic Encounter.Type Priority OrderDateTime
## 1 IP Inpatient Routine 12/27/16 10:32
## 2 IP Inpatient Routine 1/13/17 11:44
## 3 IP Inpatient Routine 1/2/17 17:19
## 4 IP Inpatient Routine 11/13/16 10:13
## 5 IP Inpatient STAT 12/13/16 3:22
## 6 IP Inpatient Routine 1/17/17 5:38
## ExamCompleteDateTime FinalDateTime Loc.At.Exam.Complete
## 1 12/27/16 11:19 12/28/16 14:32 GTU
## 2 1/13/17 12:32 1/14/17 16:00 GTU
## 3 1/2/17 18:00 1/3/17 7:44 3W
## 4 11/14/16 9:34 11/14/16 16:40 4W
## 5 12/13/16 4:04 12/13/16 3:19 Emergency Ctr
## 6 1/17/17 7:47 1/17/17 10:55 3E
## Exam.Completed.Bucket Section Exam.Room
## 1 8a-8p DX DX Rm 1
## 2 8a-8p DX DX Rm 1
## 3 8a-8p EC DX DX Rm 5 (EC)
## 4 8a-8p DX DX Rm 1
## 5 12a-8a EC DX DX Rm 5 (EC)
## 6 12a-8a DX DX Portable
df2<-df[,c(2,9)]
head(df2)
## PatientAge Priority
## 1 75 Routine
## 2 87 Routine
## 3 35 Routine
## 4 51 Routine
## 5 67 STAT
## 6 54 Routine
df2Priority<-as.factor(df2$Priority)
str(df2)
## 'data.frame': 43631 obs. of 2 variables:
## $ PatientAge: int 75 87 35 51 67 54 34 65 67 40 ...
## $ Priority : chr "Routine" "Routine" "Routine" "Routine" ...
lets look at some basic descriptive statics for each variable
Here are some summary statistics for patient Age
summary(df2$PatientAge)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.0 33.0 53.0 50.5 67.0 102.0
boxplot(df2$PatientAge)
df<-read.csv("https://raw.githubusercontent.com/tmatis12/datafiles/refs/heads/main/RadDat_CareOne.csv")
head(df)
df2<-data.frame(df$PatientAge,df$Priority)
colnames(df2)<-c("PatientAge","Priority")
head(df)
df2<-df[,c(2,9)]
head(df2)
df2Priority<-as.factor(df2$Priority)
str(df2)
summary(df2$PatientAge)
boxplot(df2$PatientAge)