This is an R Markdown Notebook. When you execute code within the notebook, the results appear beneath the code.
library(XLConnect)
package 㤼㸱XLConnect㤼㸲 was built under R version 4.0.5XLConnect 1.0.3 by Mirai Solutions GmbH [aut],
Martin Studer [cre],
The Apache Software Foundation [ctb, cph] (Apache POI),
Graph Builder [ctb, cph] (Curvesapi Java library)
https://mirai-solutions.ch
https://github.com/miraisolutions/xlconnect
library(agricolae)
package 㤼㸱agricolae㤼㸲 was built under R version 4.0.5
library(readxl)
package 㤼㸱readxl㤼㸲 was built under R version 4.0.5
rendimiento_de_Arveja_en_CAM <- read_excel("rendimiento de Arveja en CAM.xlsx")
View(rendimiento_de_Arveja_en_CAM)
Datos<- read_excel("rendimiento de Arveja en CAM.xlsx")
attach(Datos)
names(Datos)
[1] "Tratamientos" "Tratamiento" "planta" "Vainas" "Granos" "Peso"
str(Datos)
tibble [18 x 6] (S3: tbl_df/tbl/data.frame)
$ Tratamientos: chr [1:18] "T! C- (0 L/ha TV) 0% FC" NA NA "T2 C+ (0 L/ha TV) 100% FC" ...
$ Tratamiento : num [1:18] 1 1 1 2 2 2 3 3 3 4 ...
$ planta : num [1:18] 1 2 3 1 2 3 1 2 3 1 ...
$ Vainas : num [1:18] 10.8 9.4 10 18.6 13.4 15.4 9.8 8.8 9.4 13.1 ...
$ Granos : num [1:18] 5.97 5.73 6.17 6.67 6.67 ...
$ Peso : num [1:18] 51.9 41.6 45.1 54.7 50.1 ...
plan<-factor(planta)
Trat<-factor(Tratamiento)
Modelo<-lm(Vainas~Trat+plan)
ANOVA<-aov(Modelo)
summary(ANOVA)
Df Sum Sq Mean Sq F value Pr(>F)
Trat 5 91.57 18.314 12.804 0.000441 ***
plan 2 17.13 8.565 5.988 0.019509 *
Residuals 10 14.30 1.430
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
tratam<- LSD.test(y = ANOVA, trt = "Trat",group = T, console = T)
Study: ANOVA ~ "Trat"
LSD t Test for Vainas
Mean Square Error: 1.430333
Trat, means and individual ( 95 %) CI
Alpha: 0.05 ; DF Error: 10
Critical Value of t: 2.228139
least Significant Difference: 2.175781
Treatments with the same letter are not significantly different.
bar.group(x = tratam$groups,
ylim=c(0,20),
main=" Comparación rendimiento Vainas por planta ",
xlab="Tratamiento ",
ylab="Rendimiento (# Vainas/Planta) ",
col="grey")
Modelo<-lm(Granos~Trat+plan)
ANOVA<-aov(Modelo)
summary(ANOVA)
Df Sum Sq Mean Sq F value Pr(>F)
Trat 5 2.3837 0.4767 6.335 0.00668 **
plan 2 1.2104 0.6052 8.041 0.00828 **
Residuals 10 0.7526 0.0753
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
tratam<- LSD.test(y = ANOVA, trt = "Trat",group = T, console = T)
Study: ANOVA ~ "Trat"
LSD t Test for Granos
Mean Square Error: 0.07525926
Trat, means and individual ( 95 %) CI
Alpha: 0.05 ; DF Error: 10
Critical Value of t: 2.228139
least Significant Difference: 0.4990874
Treatments with the same letter are not significantly different.
bar.group(x = tratam$groups,
ylim=c(0,8),
main=" Comparación rendimiento Granos por vaina ",
xlab="Tratamiento ",
ylab="Rendimiento (# granos/ vaina) ",
col="grey")
Modelo<-lm(Peso~Trat+plan)
ANOVA<-aov(Modelo)
summary(ANOVA)
Df Sum Sq Mean Sq F value Pr(>F)
Trat 5 219.46 43.89 4.478 0.0211 *
plan 2 58.67 29.34 2.993 0.0958 .
Residuals 10 98.01 9.80
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
tratam<- LSD.test(y = ANOVA, trt = "Trat",group = T, console = T)
Study: ANOVA ~ "Trat"
LSD t Test for Peso
Mean Square Error: 9.801243
Trat, means and individual ( 95 %) CI
Alpha: 0.05 ; DF Error: 10
Critical Value of t: 2.228139
least Significant Difference: 5.69557
Treatments with the same letter are not significantly different.
bar.group(x = tratam$groups,
ylim=c(0,60),
main=" Comparación rendimiento Peso de 100 granos ",
xlab="Tratamiento ",
ylab="Rendimiento peso en (g) ",
col="grey")
Add a new chunk by clicking the Insert Chunk button on the toolbar or by pressing Ctrl+Alt+I.
When you save the notebook, an HTML file containing the code and output will be saved alongside it (click the Preview button or press Ctrl+Shift+K to preview the HTML file).
The preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike Knit, Preview does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed.