Cargar datos
library(readxl)
library(ggplot2)
library(dplyr)
##
## Adjuntando el paquete: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
archivo <- file.choose()
datos <- read_excel(archivo, sheet = "Comunidad_160")
head(datos)
## # A tibble: 6 Ć 30
## Fecha_medicion Medicion Parcela Etapa Sp01 Sp02 Sp03 Sp04 Sp05 Sp06
## <dttm> <dbl> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 2025-01-05 00:00:00 1 P01 Pion⦠17 33 23 12 16 8
## 2 2025-01-05 00:00:00 1 P02 Inte⦠13 10 12 17 6 5
## 3 2025-01-05 00:00:00 1 P03 Tard⦠10 6 10 5 4 4
## 4 2025-01-05 00:00:00 1 P04 Madu⦠3 0 5 6 16 5
## 5 2025-01-12 00:00:00 2 P01 Pion⦠22 21 28 4 16 1
## 6 2025-01-12 00:00:00 2 P02 Inte⦠7 2 16 27 11 17
## # ā¹ 20 more variables: Sp07 <dbl>, Sp08 <dbl>, Sp09 <dbl>, Sp10 <dbl>,
## # Sp11 <dbl>, Sp12 <dbl>, Sp13 <dbl>, Sp14 <dbl>, Sp15 <dbl>,
## # Total_ind <dbl>, Riqueza <dbl>, Shannon <dbl>, Simpson <dbl>, Pielou <dbl>,
## # N_mgL <dbl>, P_mgL <dbl>, N_molar <dbl>, P_molar <dbl>, NP_molar <dbl>,
## # Limitacion <chr>
Diversidad Shannon
ggplot(datos, aes(x = Parcela, y = Shannon, fill = Parcela)) +
geom_boxplot() +
theme_minimal()

Riqueza de especies
ggplot(datos, aes(x = Parcela, y = Riqueza, fill = Parcela)) +
geom_boxplot() +
theme_minimal()

Cambio temporal
ggplot(datos, aes(x = Medicion, y = Shannon, color = Parcela)) +
geom_line() +
theme_minimal()

Tipo de limitación
ggplot(datos, aes(x = Limitacion, fill = Limitacion)) +
geom_bar() +
theme_minimal()
