pairewise avac ggplot(Pla, aes(x = (Test), y = Poids, fill = Jour)) + geomboxplot() +…
- User
pairewise avac ggplot(Pla, aes(x = (Test), y = Poids, fill = Jour)) + geom_boxplot() + labs(title = "Comparaison Poids pour Abricot à J3,J7", x = "Substrat", y = "Poids") + scale_fill_manual(values = c(J3="blue",J7="red")) + theme_minimal() + scale_y_continuous(trans = 'log10')
- Assistant
This code is using ggplot2 library in R to create a pairwise boxplot comparing the weight of Abricot on days 3 and 7 (J3,J7). The x-axis represents different substrates (Test), the y-axis represents the weight (Poids), and the fill color represents the different days (J3 and J7).
geom_boxplot(): Adds the box plot to the plot.labs(): Sets the title and axis labels.scale_fill_manual(): Sets the fill colors for the days J3 and J7.theme_minimal(): Applies a minimalistic theme to the plot.scale_y_continuous(trans = 'log10'): Applies a log10 transformation to the y-axis values.
- User
je veux faire un pairewise
- Assistant
D'accord, pour créer un diagramme en paires (pairwise), vous pouvez utiliser la fonction
pairwise_boxplot()du packageggpubr. Voici un exemple de code pour réaliser un diagramme en paires :# Installer le package ggpubr s'il n'est pas déjà installé install.packages("ggpubr") # Charger le package ggpubr library(ggpubr) # Créer un diagramme en paires des poids pour Abricot à J3 et J7 pairwise_boxplot(Pla, x = "Test", y = "Poids", color = "Jour", fill = "Jour", title = "Comparaison Poids pour Abricot à J3,J7", ylab = "Poids", xlab = "Substrat", trans = "log10")Assurez-vous de remplacer
"Pla"par le nom de votre jeu de données,"Test"par la colonne représentant les substrats, et"Poids"par la colonne représentant les poids.