There is an example of my data in the image, explication: cell density of triplicat, from different treatments. the cell density depends on time (day). the results are growth curves and I want to compare those results. To perform tuky’s test. I used this R program:
I want to know if This R code is correct for my data? and how can I plot the tukey’s results? the results I hope to have; y-axis: cell density, x-axis; time and the treatment on the curves. I want to report the results in the form of a box analysis with Tukey’s test, I am not committed to a single style of graph because I am not familiar with what can be done with my data and with this test
library(tidyverse)
library(multcompView)
data <- data.fram( #my ddata)
melted_data <- data %>%
pivot_longer(-day, names_to = "treatment", values_to = "mesures")
# test ANOVA
model <- aov(mesures ~ treatment, data = melted_data)
# test Tukey
tukey_results <- TukeyHSD(model)
I tried this but doesn’t work, no error but no plot!
# Plotting the Tukey results
plot(tukey_results, las = 1, col = "darkgray", ylab = "Density")