

R for Fun Club (RFC)
Do you want to learn R Programming with other lazy coders? This is your group. We also didn’t... View more
Conditioning my regression to not show anything below 0
-
Conditioning my regression to not show anything below 0
This was my sample code
ggplot() +
geom_smooth(data = cytokines_postop, aes(x = Timing_cytokines, y = as.double(
IL-10
)), method = “loess”, formula = y ~ x, colour = “red”, fill=”violet”) +geom_smooth(data = cytokines_preop, aes(x = Timing_cytokines, y = as.double(
IL-10
)), method = “loess”, formula = y ~ x, colour = “blue”,fill=”lightblue”) +geom_area()+
ylab(“Cytokine Concentration (pg/dl)”) +
xlab(“Post-injury timing (days)”) +
ggtitle(“IL-10 Cytokine Concentration over Time”) +
theme_light() +
theme(plot.title = element_text(size = 10))+
geom_hline(yintercept = 0)
Log in to reply.