Correlation Analysis

Pearson correlation matrix among leaf area, leaf number, and plant height across all measurement dates and treatments.

Overview

This section examines the linear associations among the three vegetative growth traits measured at each harvest:

  • Leaf area per plant (af_planta, cm² plant⁻¹)
  • Leaf number per plant (n, leaves plant⁻¹)
  • Plant height (cp, cm)

A Pearson correlation matrix with significance stars is produced via metan::corr_plot().

Required packages

Show code
library(rio)    # Data import
library(metan)  # corr_plot() – correlation matrix with visual output
library(ggplot2)

Correlation plot

Show code
import("../df_model_cresc.xlsx") |>
  # Select the three growth variables; corr_plot() handles pairwise correlations
  corr_plot(af_planta, n, cp)

Pearson correlation matrix among leaf area, leaf number, and plant height. The lower panel shows scatter plots with a linear smoother; the upper panel shows the correlation coefficient and its significance (*** p < 0.001, ** p < 0.01, * p < 0.05).
Show code

ggsave("../figs/correlacao.jpg", width = 6, height = 6)
Note

All three traits are expected to be positively and strongly correlated given that they are all driven by the same thermal-time accumulation process.

Session information

Show code
sessionInfo()
## R version 4.5.1 (2025-06-13 ucrt)
## Platform: x86_64-w64-mingw32/x64
## Running under: Windows 11 x64 (build 26200)
## 
## Matrix products: default
##   LAPACK version 3.12.1
## 
## locale:
## [1] LC_COLLATE=Portuguese_Brazil.utf8  LC_CTYPE=Portuguese_Brazil.utf8   
## [3] LC_MONETARY=Portuguese_Brazil.utf8 LC_NUMERIC=C                      
## [5] LC_TIME=Portuguese_Brazil.utf8    
## 
## time zone: America/Sao_Paulo
## tzcode source: internal
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] ggplot2_4.0.2 metan_1.19.0  rio_1.2.4    
## 
## loaded via a namespace (and not attached):
##  [1] gtable_0.3.6        xfun_0.56           htmlwidgets_1.6.4  
##  [4] ggrepel_0.9.7       GGally_2.4.0        lattice_0.22-9     
##  [7] mathjaxr_2.0-0      numDeriv_2016.8-1.1 vctrs_0.7.1        
## [10] tools_4.5.1         Rdpack_2.6.6        generics_0.1.4     
## [13] tibble_3.3.1        pkgconfig_2.0.3     R.oo_1.27.1        
## [16] Matrix_1.7-4        RColorBrewer_1.1-3  S7_0.2.1           
## [19] readxl_1.4.5        lifecycle_1.0.5     compiler_4.5.1     
## [22] farver_2.1.2        textshaping_1.0.4   ggforce_0.5.0      
## [25] codetools_0.2-20    lmerTest_3.2-0      htmltools_0.5.9    
## [28] yaml_2.3.12         pillar_1.11.1       nloptr_2.2.1       
## [31] tidyr_1.3.2         MASS_7.3-65         R.utils_2.13.0     
## [34] reformulas_0.4.4    boot_1.3-32         nlme_3.1-168       
## [37] ggstats_0.12.0      tidyselect_1.2.1    digest_0.6.39      
## [40] dplyr_1.2.1         purrr_1.2.1         labeling_0.4.3     
## [43] splines_4.5.1       polyclip_1.10-7     fastmap_1.2.0      
## [46] grid_4.5.1          cli_3.6.5           magrittr_2.0.4     
## [49] patchwork_1.3.2     dichromat_2.0-0.1   withr_3.0.2        
## [52] scales_1.4.0        rmarkdown_2.30      otel_0.2.0         
## [55] lme4_1.1-38         cellranger_1.1.0    ragg_1.5.0         
## [58] R.methodsS3_1.8.2   evaluate_1.0.5      knitr_1.51         
## [61] rbibutils_2.4.1     rlang_1.1.7         Rcpp_1.1.1         
## [64] glue_1.8.0          tweenr_2.0.3        rstudioapi_0.18.0  
## [67] minqa_1.2.8         jsonlite_2.0.0      R6_2.6.1           
## [70] systemfonts_1.3.1