Está en la página 1de 2

R version 3.6.

3 (2020-02-29) -- "Holding the Windsock"


Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: i386-w64-mingw32/i386 (32-bit)

R es un software libre y viene sin GARANTIA ALGUNA.


Usted puede redistribuirlo bajo ciertas circunstancias.
Escriba 'license()' o 'licence()' para detalles de distribucion.

R es un proyecto colaborativo con muchos contribuyentes.


Escriba 'contributors()' para obtener más información y
'citation()' para saber cómo citar R o paquetes de R en publicaciones.

Escriba 'demo()' para demostraciones, 'help()' para el sistema on-line de ayuda,


o 'help.start()' para abrir el sistema de ayuda HTML con su navegador.
Escriba 'q()' para salir de R.

[Workspace loaded from ~/.RData]

> library(readxl)
> Fertilización_de_pastos <- read_excel("D:/VICTOR/DISEÑO EXPERIMENTAL/Fertilización de
pastos.xls")
> View(Fertilización_de_pastos)
> # RENAME VARIABLES
> Data = Fertilización_de_pastos
> # RENAME DATA
> Data = Fertilización_de_pastos
> #RENAME VARIABLES
> TONELADAS = Fertilización_de_pastos$TONELADAS
> FERTIL = Fertilización_de_pastos$FERTILIZACION
Warning message:
Unknown or uninitialised column: `FERTILIZACION`.
> FERTIL = Fertilización_de_pastos$FERTILIZACIÓN
> ANOVA <- aov(TONELADAS ~ FERTIL, data = Data)
> summary(ANOVA)
Df Sum Sq Mean Sq F value Pr(>F)
FERTIL 3 1010.6 336.9 16221 <2e-16 ***
Residuals 12 0.2 0.0
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> library(agricolae)
> # LSD
> (LSD.test(ANOVA 'FERTIL'))
Error: unexpected string constant in "(LSD.test(ANOVA 'FERTIL'"
> (LSD.test(ANOVA, 'FERTIL'))
$statistics
MSerror Df Mean CV t.value LSD
0.02076599 12 26.89294 0.5358435 2.178813 0.2220145

$parameters
test p.ajusted name.t ntr alpha
Fisher-LSD none FERTIL 4 0.05

$means
TONELADAS std r LCL UCL Min Max Q25 Q50 Q75
A 14.68328 0.12851058 4 14.52629 14.84026 14.5141 14.823 14.63552 14.6980 14.74575
B 25.17850 0.15734781 4 25.02151 25.33549 25.0310 25.401 25.10600 25.1410 25.21350
C 32.49750 0.18320935 4 32.34051 32.65449 32.2560 32.669 32.40900 32.5325 32.62100
D 35.21250 0.09069179 4 35.05551 35.36949 35.1000 35.300 35.16000 35.2250 35.27750

$comparison
NULL

$groups
TONELADAS groups
D 35.21250 a
C 32.49750 b
B 25.17850 c
A 14.68328 d
attr(,"class")
[1] "group"
> # TUKEY
> posthoc <- TukeyHSD(X=ANOVA, 'FERTIL', conf.level =0,95)
Error in UseMethod("TukeyHSD") :
no applicable method for 'TukeyHSD' applied to an object of class "character"
> posthoc <- TukeyHSD(X=ANOVA, 'FERTIL', conf.level =0.95)
Error in UseMethod("TukeyHSD") :
no applicable method for 'TukeyHSD' applied to an object of class "character"
> posthoc <- TukeyHSD(x=ANOVA, 'FERTIL', conf.level =0.95)
> data.test <- TukeyHSD(ANOVA)
> data.test
Tukey multiple comparisons of means
95% family-wise confidence level

Fit: aov(formula = TONELADAS ~ FERTIL, data = Data)

$FERTIL
diff lwr upr p adj
B-A 10.49522 10.192703 10.797747 0
C-A 17.81423 17.511703 18.116747 0
D-A 20.52922 20.226703 20.831747 0
C-B 7.31900 7.016478 7.621522 0
D-B 10.03400 9.731478 10.336522 0
D-C 2.71500 2.412478 3.017522 0

También podría gustarte