Displaying 1 result from an estimated 1 matches for "icudata".
Did you mean:
licudata
2023 Jan 12
1
Reg: ggplot error
Hallo
I am not familiar with any of packages you use (except of MASS and ggplot2) and the code is too complicated without any hint where the error could come from and what is the message you get. I wonder if anybody would like to go through your whole code.
1. data seems to be read correctly
ICUData <- read.csv(file = "ICUData.csv", stringsAsFactors = TRUE)
ICUData.neuro <- ICUData[ICUData$surgery == "neuro",]
2. ggplot(ICUData, aes(x=ICUData.neuro$LOS)) +
geom_histogram(aes(y=after_stat(density)), binwidth = 5,
fill = "darkgrey")
gives...