Efecto de la eficiencia de rigo sobre el cultivo de papa

Author

Alvarado Muñoz, Lesly - Comeca Huaman, Mariela - Delgado Rafael, Jamil - Diaz Saucedo, Yoel - Florida Garcia, Cristian - Luis Marin, Ney

1 Introducción

La agricultura es un sector crucial para el desarrollo económico y social de muchos países, y su rendimiento depende de múltiples factores que afectan el crecimiento de los cultivos. Aspectos como el clima, la disponibilidad de agua y los tratamientos aplicados a las plantas son determinantes para optimizar la producción agrícola (Gómez et al., 2021). En particular, la producción de papa (Solanum tuberosum) ha cobrado importancia debido a su valor nutricional y su adaptabilidad a diversas condiciones ambientales (Martínez & Pérez, 2020). Sin embargo, las variaciones en las condiciones de cultivo, como el riego y el manejo de nutrientes, pueden tener un impacto significativo en los parámetros de crecimiento de las plantas y en su productividad.

Este estudio se centra en el análisis de datos experimentales de cultivos de papa, con especial atención al peso seco de las hojas (leafdw), una medida importante que refleja la eficiencia en el uso del agua y el proceso de fotosíntesis. El peso seco de las hojas se ha empleado como un indicador en numerosos estudios para evaluar la respuesta de los cultivos a condiciones de estrés y para mejorar las prácticas de manejo agrícola (Sánchez & Rodríguez, 2019). Para el análisis de estos datos, se han utilizado herramientas estadísticas avanzadas, incluyendo el uso de la biblioteca de R googlesheets4 para importar datos desde Google Sheets, facilitando así la manipulación y el análisis directo de la información en un entorno de programación (Wickham & Grolemund, 2017).

Además, se emplean modelos lineales y técnicas de análisis multivariado para explorar las relaciones entre diversas variables de crecimiento y los efectos de distintos tratamientos. Este enfoque estadístico es esencial para identificar diferencias significativas y patrones de crecimiento en los cultivos bajo diferentes condiciones, permitiendo tomar decisiones basadas en evidencia que puedan optimizar la producción y promover prácticas agrícolas sostenibles (Aguilar et al., 2022). La aplicación de estas técnicas tiene el potencial de contribuir al desarrollo de estrategias de cultivo más eficientes y resilientes ante condiciones adversas (Brown, 2018).

2 Pasos para crear una página web

  1. Tener mi proyecto
  2. Conectar mi proyecto a GitHub
  3. Tener un archivo en html llamado “index.html”
  4. Hacer push al repositorio
  5. Activar GitHub pages

source(‘https://inkaverse.com/setup.r’)

3 Importar datos

library(googlesheets4)
library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.4     ✔ readr     2.1.5
✔ forcats   1.0.0     ✔ stringr   1.5.1
✔ ggplot2   3.5.1     ✔ tibble    3.2.1
✔ lubridate 1.9.3     ✔ tidyr     1.3.1
✔ purrr     1.0.2     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
url <-"https://docs.google.com/spreadsheets/d/15r7ZwcZZHbEgltlF6gSFvCTFA-CFzVBWwg3mFlRyKPs/edit?gid=172957346#gid=172957346"
gs<-as_sheets_id(url)

fb<-gs %>%
  range_read("fb")
! Using an auto-discovered, cached token.
  To suppress this message, modify your code or options to clearly consent to
  the use of a cached token.
  See gargle's "Non-interactive auth" vignette for more details:
  <https://gargle.r-lib.org/articles/non-interactive-auth.html>
ℹ The googlesheets4 package is using a cached token for
  '7576425921@untrm.edu.pe'.
Auto-refreshing stale OAuth token.
✔ Reading from "LA MOLINA 2014 POTATO WUE (FB)".
✔ Range ''fb''.
view(fb)

4 Modelo lineal de leafdw (peso seco de la hoja)

modelo_leafdw <- lm(formula = leafdw ~ bloque + geno + riego + riego:geno, data = fb)

anova(modelo_leafdw)
Analysis of Variance Table

Response: leafdw
            Df  Sum Sq Mean Sq  F value  Pr(>F)    
bloque       4   26.13    6.53   1.1810 0.32286    
geno        14 2437.24  174.09  31.4688 < 2e-16 ***
riego        1 1065.87 1065.87 192.6695 < 2e-16 ***
geno:riego  14  172.96   12.35   2.2332 0.01023 *  
Residuals  116  641.72    5.53                     
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
str(fb)
tibble [150 × 18] (S3: tbl_df/tbl/data.frame)
 $ riego  : chr [1:150] "sequia" "sequia" "irrigado" "sequia" ...
 $ geno   : chr [1:150] "G01" "G02" "G01" "G02" ...
 $ block  : num [1:150] 2 4 3 1 2 5 1 4 2 1 ...
 $ bloque : chr [1:150] "II" "IV" "III" "I" ...
 $ spad_29: num [1:150] 56.3 52.7 49.2 55.5 58.2 43.5 57.4 56.1 61 60.3 ...
 $ spad_83: num [1:150] 41.1 47.9 41.6 44.2 32.6 37.8 42.5 35.9 57.5 41.8 ...
 $ rwc_84 : num [1:150] 61.5 63.2 67.7 64.9 74.5 ...
 $ op_84  : num [1:150] -2.43 -3.03 -2.5 -2.4 -2.27 ...
 $ leafdw : num [1:150] 13.28 9.42 18.22 8.84 14.55 ...
 $ stemdw : num [1:150] 14.87 8.63 24.19 6.58 12.63 ...
 $ rootdw : num [1:150] 3.83 2.1 3.16 2 1.83 2.83 2.28 3.65 4.04 4.17 ...
 $ tubdw  : num [1:150] 19.8 17.7 38 13.5 51.1 ...
 $ biomdw : num [1:150] 51.8 37.8 83.6 30.9 80.2 ...
 $ hi     : num [1:150] 0.45 0.43 0.455 0.437 0.638 ...
 $ ttrans : num [1:150] 4.5 3.54 8.39 2.9 7.37 ...
 $ wue    : num [1:150] 11.51 10.69 9.97 10.65 10.88 ...
 $ twue   : num [1:150] 4.4 4.99 4.53 4.65 6.94 ...
 $ lfa    : num [1:150] 2900 2619 7579 2450 5413 ...
plot(modelo_leafdw)

5 Boxplot de leafdw

ggplot(fb, aes(x = geno, y = leafdw, colour = riego)) +
  geom_boxplot(outlier.colour ="blue", outlier.shape = 16, outlier.size = 2) +
  labs(title = "Boxplot de leafdw por Genotipo y Riego",
       x = "Interacción Riego y Genotipo",
       y = "Peso seco de la hoja (g)") +
  theme_minimal() +  expand_limits(y=0)+ scale_y_continuous(breaks = seq(0,30, by = 5))+
  theme(axis.text.x = element_text(angle = 45, hjust = 1)) 

6 Comparación De Medias

library(agricolae)


tukey_result <- HSD.test(modelo_leafdw, c("geno", "riego"), group = TRUE)
print(tukey_result)
$statistics
   MSerror  Df     Mean       CV      MSD
  5.532101 116 14.61687 16.09129 5.720223

$parameters
   test     name.t ntr StudentizedRange alpha
  Tukey geno:riego  30         5.438172  0.05

$means
             leafdw       std r       se   Min   Max   Q25   Q50   Q75
G01:irrigado 16.924 2.0971957 5 1.051865 14.29 18.66 15.01 18.22 18.44
G01:sequia   12.788 1.9627201 5 1.051865 10.37 15.05 11.18 13.28 14.06
G02:irrigado 15.112 2.4219558 5 1.051865 11.16 17.71 15.03 15.66 16.00
G02:sequia    9.586 0.5531094 5 1.051865  8.84 10.35  9.42  9.51  9.81
G03:irrigado 13.942 1.8463938 5 1.051865 11.28 16.41 13.69 13.78 14.55
G03:sequia   10.128 0.4218649 5 1.051865  9.50 10.66 10.03 10.17 10.28
G04:irrigado 19.364 2.7887865 5 1.051865 14.70 22.19 19.77 19.78 20.38
G04:sequia   12.820 1.2674581 5 1.051865 11.25 14.10 11.68 13.52 13.55
G05:irrigado 18.492 1.7552407 5 1.051865 16.34 19.88 16.82 19.67 19.75
G05:sequia   11.610 1.2971700 5 1.051865  9.75 13.25 11.26 11.51 12.28
G06:irrigado 23.388 2.0318883 5 1.051865 21.90 26.84 21.92 22.91 23.37
G06:sequia   16.666 2.1437887 5 1.051865 14.81 19.89 14.82 16.19 17.62
G07:irrigado  3.390 1.6366887 5 1.051865  2.03  5.99  2.36  2.57  4.00
G07:sequia    3.448 0.7716022 5 1.051865  2.26  4.24  3.35  3.37  4.02
G08:irrigado 18.450 1.2409875 5 1.051865 16.92 20.29 17.83 18.58 18.63
G08:sequia   11.578 2.4044272 5 1.051865  7.69 14.07 11.25 12.12 12.76
G09:irrigado 21.288 4.3975527 5 1.051865 14.07 25.08 20.79 22.04 24.46
G09:sequia   16.052 1.5566856 5 1.051865 14.34 18.03 15.06 15.52 17.31
G10:irrigado 11.656 2.8259299 5 1.051865  8.94 16.20 10.20 10.54 12.40
G10:sequia    8.810 1.1309288 5 1.051865  7.84 10.68  8.11  8.42  9.00
G11:irrigado 17.860 3.2170173 5 1.051865 12.48 21.08 18.18 18.40 19.16
G11:sequia    9.906 2.1905661 5 1.051865  7.26 12.85  8.28 10.56 10.58
G12:irrigado 18.568 2.1065541 5 1.051865 14.90 20.24 18.97 19.18 19.55
G12:sequia   12.734 1.2940943 5 1.051865 11.42 14.70 11.78 12.61 13.16
G13:irrigado 22.946 1.0621582 5 1.051865 21.38 24.04 22.58 22.93 23.80
G13:sequia   14.010 1.8583191 5 1.051865 11.39 16.20 13.03 14.40 15.03
G14:irrigado 21.526 6.7197753 5 1.051865 10.07 27.58 22.04 23.46 24.48
G14:sequia   17.152 2.5828705 5 1.051865 14.33 20.96 15.91 16.13 18.43
G15:irrigado 16.332 2.3935894 5 1.051865 12.69 18.73 15.48 16.68 18.08
G15:sequia   11.980 1.0314310 5 1.051865 10.73 13.31 11.22 12.08 12.56

$comparison
NULL

$groups
             leafdw groups
G06:irrigado 23.388      a
G13:irrigado 22.946      a
G14:irrigado 21.526     ab
G09:irrigado 21.288     ab
G04:irrigado 19.364    abc
G12:irrigado 18.568    abc
G05:irrigado 18.492   abcd
G08:irrigado 18.450  abcde
G11:irrigado 17.860  abcde
G14:sequia   17.152  bcdef
G01:irrigado 16.924  bcdef
G06:sequia   16.666  bcdef
G15:irrigado 16.332  bcdef
G09:sequia   16.052  bcdef
G02:irrigado 15.112  cdefg
G13:sequia   14.010 cdefgh
G03:irrigado 13.942 cdefgh
G04:sequia   12.820  defgh
G01:sequia   12.788  defgh
G12:sequia   12.734   efgh
G15:sequia   11.980    fgh
G10:irrigado 11.656    fgh
G05:sequia   11.610    fgh
G08:sequia   11.578    fgh
G03:sequia   10.128     gh
G11:sequia    9.906     gh
G02:sequia    9.586     gh
G10:sequia    8.810     hi
G07:sequia    3.448      i
G07:irrigado  3.390      i

attr(,"class")
[1] "group"
str(tukey_result)
List of 5
 $ statistics:'data.frame': 1 obs. of  5 variables:
  ..$ MSerror: num 5.53
  ..$ Df     : int 116
  ..$ Mean   : num 14.6
  ..$ CV     : num 16.1
  ..$ MSD    : num 5.72
 $ parameters:'data.frame': 1 obs. of  5 variables:
  ..$ test            : chr "Tukey"
  ..$ name.t          : chr "geno:riego"
  ..$ ntr             : int 30
  ..$ StudentizedRange: num 5.44
  ..$ alpha           : num 0.05
 $ means     :'data.frame': 30 obs. of  9 variables:
  ..$ leafdw: num [1:30] 16.92 12.79 15.11 9.59 13.94 ...
  ..$ std   : num [1:30] 2.097 1.963 2.422 0.553 1.846 ...
  ..$ r     : int [1:30] 5 5 5 5 5 5 5 5 5 5 ...
  ..$ se    : num [1:30] 1.05 1.05 1.05 1.05 1.05 ...
  ..$ Min   : num [1:30] 14.29 10.37 11.16 8.84 11.28 ...
  ..$ Max   : num [1:30] 18.7 15.1 17.7 10.3 16.4 ...
  ..$ Q25   : num [1:30] 15.01 11.18 15.03 9.42 13.69 ...
  ..$ Q50   : num [1:30] 18.22 13.28 15.66 9.51 13.78 ...
  ..$ Q75   : num [1:30] 18.44 14.06 16 9.81 14.55 ...
 $ comparison: NULL
 $ groups    :'data.frame': 30 obs. of  2 variables:
  ..$ leafdw: num [1:30] 23.4 22.9 21.5 21.3 19.4 ...
  ..$ groups: chr [1:30] "a" "a" "ab" "ab" ...
 - attr(*, "class")= chr "group"
library(tidyverse)

mc <- tukey_result$groups %>% 
  rownames_to_column("trat") %>% 
  separate(trat, c("riego", "variedad")) 


str (mc)
'data.frame':   30 obs. of  4 variables:
 $ riego   : chr  "G06" "G13" "G14" "G09" ...
 $ variedad: chr  "irrigado" "irrigado" "irrigado" "irrigado" ...
 $ leafdw  : num  23.4 22.9 21.5 21.3 19.4 ...
 $ groups  : chr  "a" "a" "ab" "ab" ...

6.1 Gráfico de barras

library(ggplot2)

ggplot(mc, aes(x = riego, y = leafdw, fill = variedad)) +
  geom_bar(stat = "identity", position = position_dodge(width = 0.9)) +  # Barras agrupadas por variedad
  geom_text(aes(label = groups), position = position_dodge(0.9), vjust = -0.5, size = 3) +  # Etiquetas sobre las barras
  labs(title = "Producción de LEAFDW por Riego y Variedad", x = "variedad", y = "LEAFDW", fill = "riego") +  # Etiquetas de los ejes y título
  scale_fill_manual(values = c("irrigado" = "tomato", "sequia" = "turquoise3")) +  # Colores personalizados para las variedades
  theme_minimal() +  # Tema minimalista
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

7 comparacion de medias: emmeans

library(emmeans)
Welcome to emmeans.
Caution: You lose important information if you filter this package's results.
See '? untidy'
library(multcomp)
Cargando paquete requerido: mvtnorm
Cargando paquete requerido: survival
Cargando paquete requerido: TH.data
Cargando paquete requerido: MASS

Adjuntando el paquete: 'MASS'
The following object is masked from 'package:dplyr':

    select

Adjuntando el paquete: 'TH.data'
The following object is masked from 'package:MASS':

    geyser
library(dplyr)
library(MASS)

cm1 <- emmeans(modelo_leafdw, ~ geno | riego) %>% 
  cld(Letters = letters, reversed = T)

cm1
riego = irrigado:
 geno emmean   SE  df lower.CL upper.CL .group   
 G06   23.39 1.05 116    21.30    25.47  a       
 G13   22.95 1.05 116    20.86    25.03  ab      
 G14   21.53 1.05 116    19.44    23.61  abc     
 G09   21.29 1.05 116    19.20    23.37  abcd    
 G04   19.36 1.05 116    17.28    21.45  abcde   
 G12   18.57 1.05 116    16.48    20.65  abcdef  
 G05   18.49 1.05 116    16.41    20.58  abcdef  
 G08   18.45 1.05 116    16.37    20.53  abcdef  
 G11   17.86 1.05 116    15.78    19.94   bcdef  
 G01   16.92 1.05 116    14.84    19.01    cdef  
 G15   16.33 1.05 116    14.25    18.42     defg 
 G02   15.11 1.05 116    13.03    17.20      efg 
 G03   13.94 1.05 116    11.86    16.03       fg 
 G10   11.66 1.05 116     9.57    13.74        g 
 G07    3.39 1.05 116     1.31     5.47         h

riego = sequia:
 geno emmean   SE  df lower.CL upper.CL .group   
 G14   17.15 1.05 116    15.07    19.24  a       
 G06   16.67 1.05 116    14.58    18.75  ab      
 G09   16.05 1.05 116    13.97    18.14  ab      
 G13   14.01 1.05 116    11.93    16.09  abc     
 G04   12.82 1.05 116    10.74    14.90  abcd    
 G01   12.79 1.05 116    10.70    14.87  abcd    
 G12   12.73 1.05 116    10.65    14.82  abcd    
 G15   11.98 1.05 116     9.90    14.06   bcd    
 G05   11.61 1.05 116     9.53    13.69   bcd    
 G08   11.58 1.05 116     9.49    13.66   bcd    
 G03   10.13 1.05 116     8.04    12.21    cd    
 G11    9.91 1.05 116     7.82    11.99    cd    
 G02    9.59 1.05 116     7.50    11.67    cd    
 G10    8.81 1.05 116     6.73    10.89     d    
 G07    3.45 1.05 116     1.36     5.53      e   

Results are averaged over the levels of: bloque 
Confidence level used: 0.95 
P value adjustment: tukey method for comparing a family of 15 estimates 
significance level used: alpha = 0.05 
NOTE: If two or more means share the same grouping symbol,
      then we cannot show them to be different.
      But we also did not show them to be the same. 
cm2 <- emmeans(modelo_leafdw, ~ riego | geno) %>% 
  cld(Letters = letters, reversed = T)

cm2
geno = G01:
 riego    emmean   SE  df lower.CL upper.CL .group
 irrigado  16.92 1.05 116    14.84    19.01  a    
 sequia    12.79 1.05 116    10.70    14.87   b   

geno = G02:
 riego    emmean   SE  df lower.CL upper.CL .group
 irrigado  15.11 1.05 116    13.03    17.20  a    
 sequia     9.59 1.05 116     7.50    11.67   b   

geno = G03:
 riego    emmean   SE  df lower.CL upper.CL .group
 irrigado  13.94 1.05 116    11.86    16.03  a    
 sequia    10.13 1.05 116     8.04    12.21   b   

geno = G04:
 riego    emmean   SE  df lower.CL upper.CL .group
 irrigado  19.36 1.05 116    17.28    21.45  a    
 sequia    12.82 1.05 116    10.74    14.90   b   

geno = G05:
 riego    emmean   SE  df lower.CL upper.CL .group
 irrigado  18.49 1.05 116    16.41    20.58  a    
 sequia    11.61 1.05 116     9.53    13.69   b   

geno = G06:
 riego    emmean   SE  df lower.CL upper.CL .group
 irrigado  23.39 1.05 116    21.30    25.47  a    
 sequia    16.67 1.05 116    14.58    18.75   b   

geno = G07:
 riego    emmean   SE  df lower.CL upper.CL .group
 sequia     3.45 1.05 116     1.36     5.53  a    
 irrigado   3.39 1.05 116     1.31     5.47  a    

geno = G08:
 riego    emmean   SE  df lower.CL upper.CL .group
 irrigado  18.45 1.05 116    16.37    20.53  a    
 sequia    11.58 1.05 116     9.49    13.66   b   

geno = G09:
 riego    emmean   SE  df lower.CL upper.CL .group
 irrigado  21.29 1.05 116    19.20    23.37  a    
 sequia    16.05 1.05 116    13.97    18.14   b   

geno = G10:
 riego    emmean   SE  df lower.CL upper.CL .group
 irrigado  11.66 1.05 116     9.57    13.74  a    
 sequia     8.81 1.05 116     6.73    10.89  a    

geno = G11:
 riego    emmean   SE  df lower.CL upper.CL .group
 irrigado  17.86 1.05 116    15.78    19.94  a    
 sequia     9.91 1.05 116     7.82    11.99   b   

geno = G12:
 riego    emmean   SE  df lower.CL upper.CL .group
 irrigado  18.57 1.05 116    16.48    20.65  a    
 sequia    12.73 1.05 116    10.65    14.82   b   

geno = G13:
 riego    emmean   SE  df lower.CL upper.CL .group
 irrigado  22.95 1.05 116    20.86    25.03  a    
 sequia    14.01 1.05 116    11.93    16.09   b   

geno = G14:
 riego    emmean   SE  df lower.CL upper.CL .group
 irrigado  21.53 1.05 116    19.44    23.61  a    
 sequia    17.15 1.05 116    15.07    19.24   b   

geno = G15:
 riego    emmean   SE  df lower.CL upper.CL .group
 irrigado  16.33 1.05 116    14.25    18.42  a    
 sequia    11.98 1.05 116     9.90    14.06   b   

Results are averaged over the levels of: bloque 
Confidence level used: 0.95 
significance level used: alpha = 0.05 
NOTE: If two or more means share the same grouping symbol,
      then we cannot show them to be different.
      But we also did not show them to be the same. 
cm3 <- emmeans(modelo_leafdw, ~ riego * geno) %>% 
  cld(Letters = letters, reversed = T)

cm3
 riego    geno emmean   SE  df lower.CL upper.CL .group    
 irrigado G06   23.39 1.05 116    21.30    25.47  a        
 irrigado G13   22.95 1.05 116    20.86    25.03  a        
 irrigado G14   21.53 1.05 116    19.44    23.61  ab       
 irrigado G09   21.29 1.05 116    19.20    23.37  ab       
 irrigado G04   19.36 1.05 116    17.28    21.45  abc      
 irrigado G12   18.57 1.05 116    16.48    20.65  abc      
 irrigado G05   18.49 1.05 116    16.41    20.58  abcd     
 irrigado G08   18.45 1.05 116    16.37    20.53  abcde    
 irrigado G11   17.86 1.05 116    15.78    19.94  abcde    
 sequia   G14   17.15 1.05 116    15.07    19.24   bcdef   
 irrigado G01   16.92 1.05 116    14.84    19.01   bcdef   
 sequia   G06   16.67 1.05 116    14.58    18.75   bcdef   
 irrigado G15   16.33 1.05 116    14.25    18.42   bcdef   
 sequia   G09   16.05 1.05 116    13.97    18.14   bcdef   
 irrigado G02   15.11 1.05 116    13.03    17.20    cdefg  
 sequia   G13   14.01 1.05 116    11.93    16.09    cdefgh 
 irrigado G03   13.94 1.05 116    11.86    16.03    cdefgh 
 sequia   G04   12.82 1.05 116    10.74    14.90     defgh 
 sequia   G01   12.79 1.05 116    10.70    14.87     defgh 
 sequia   G12   12.73 1.05 116    10.65    14.82      efgh 
 sequia   G15   11.98 1.05 116     9.90    14.06       fgh 
 irrigado G10   11.66 1.05 116     9.57    13.74       fgh 
 sequia   G05   11.61 1.05 116     9.53    13.69       fgh 
 sequia   G08   11.58 1.05 116     9.49    13.66       fgh 
 sequia   G03   10.13 1.05 116     8.04    12.21        gh 
 sequia   G11    9.91 1.05 116     7.82    11.99        gh 
 sequia   G02    9.59 1.05 116     7.50    11.67        gh 
 sequia   G10    8.81 1.05 116     6.73    10.89         hi
 sequia   G07    3.45 1.05 116     1.36     5.53          i
 irrigado G07    3.39 1.05 116     1.31     5.47          i

Results are averaged over the levels of: bloque 
Confidence level used: 0.95 
P value adjustment: tukey method for comparing a family of 30 estimates 
significance level used: alpha = 0.05 
NOTE: If two or more means share the same grouping symbol,
      then we cannot show them to be different.
      But we also did not show them to be the same. 

7.1 Gráfico

dtcm <- as.data.frame(cm2) %>% 
  rename(sig = ".group")

ggplot(dtcm, aes(x = geno, y = emmean, fill = riego)) +
  geom_bar(stat = "identity", position = "dodge", color = "black") +
  geom_text(aes(label = sig, y = emmean*1.05),
            position = position_dodge(width = 0.9),
            vjust = 0) +
  labs(x = "Genotipo", y = "leafdw", fill = "Riego") +
  theme_minimal() +
  theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
  ggtitle("Gráfico de barras: leafdw por genotipo y riego")

8 Análisis multivariado

str(fb)
tibble [150 × 18] (S3: tbl_df/tbl/data.frame)
 $ riego  : chr [1:150] "sequia" "sequia" "irrigado" "sequia" ...
 $ geno   : chr [1:150] "G01" "G02" "G01" "G02" ...
 $ block  : num [1:150] 2 4 3 1 2 5 1 4 2 1 ...
 $ bloque : chr [1:150] "II" "IV" "III" "I" ...
 $ spad_29: num [1:150] 56.3 52.7 49.2 55.5 58.2 43.5 57.4 56.1 61 60.3 ...
 $ spad_83: num [1:150] 41.1 47.9 41.6 44.2 32.6 37.8 42.5 35.9 57.5 41.8 ...
 $ rwc_84 : num [1:150] 61.5 63.2 67.7 64.9 74.5 ...
 $ op_84  : num [1:150] -2.43 -3.03 -2.5 -2.4 -2.27 ...
 $ leafdw : num [1:150] 13.28 9.42 18.22 8.84 14.55 ...
 $ stemdw : num [1:150] 14.87 8.63 24.19 6.58 12.63 ...
 $ rootdw : num [1:150] 3.83 2.1 3.16 2 1.83 2.83 2.28 3.65 4.04 4.17 ...
 $ tubdw  : num [1:150] 19.8 17.7 38 13.5 51.1 ...
 $ biomdw : num [1:150] 51.8 37.8 83.6 30.9 80.2 ...
 $ hi     : num [1:150] 0.45 0.43 0.455 0.437 0.638 ...
 $ ttrans : num [1:150] 4.5 3.54 8.39 2.9 7.37 ...
 $ wue    : num [1:150] 11.51 10.69 9.97 10.65 10.88 ...
 $ twue   : num [1:150] 4.4 4.99 4.53 4.65 6.94 ...
 $ lfa    : num [1:150] 2900 2619 7579 2450 5413 ...
library(psych)

Adjuntando el paquete: 'psych'
The following objects are masked from 'package:ggplot2':

    %+%, alpha
fb %>% 
  select_if(is.numeric) %>% 
  dplyr::select(!c("block")) %>% 
  pairs.panels(x = .
               , hist.col="red"
               , pch = 21
               , stars = TRUE
               , scale = FALSE
               , lm = TRUE
               ) 

8.1 PCA: Análisis de componentes principales

library(FactoMineR)
library(cowplot)

Adjuntando el paquete: 'cowplot'
The following object is masked from 'package:lubridate':

    stamp
mv <- fb %>%
  group_by(riego, geno) %>%
  summarise(across(where(is.numeric), ~ mean(., na.rm = TRUE))) %>%
  PCA(scale.unit = T, quali.sup = c(1:4), graph = F)
`summarise()` has grouped output by 'riego'. You can override using the
`.groups` argument.
p1 <- plot(mv,
           choix="ind",
           habillage=1,
           label = "ind")

p2 <- plot(mv,
           choix="var")

list(p1, p2) %>%
  plot_grid(plotlist = ., nrow = 1)

9 Referencias

Aguilar, M., López, D., & Rivera, J. (2022). Estadística aplicada a la agronomía. Editorial Científica. Brown, T. (2018). Sustainable agriculture: Challenges and opportunities. Journal of Agricultural Science, 10(3), 245–260. Gómez, R., Hernández, S., & Silva, L. (2021). Impacto del cambio climático en la producción de cultivos de papa. Revista de Investigación Agrícola, 5(2), 132–148. Martínez, P., & Pérez, M. (2020). La papa como alimento básico: Importancia nutricional y adaptabilidad. Revista Andina de Agricultura, 12(1), 45–56. Sánchez, J., & Rodríguez, A. (2019). Fisiología vegetal aplicada a la agricultura. Ediciones AgroCiencia. Wickham, H., & Grolemund, G. (2017). R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. O’Reilly Media.