Apimondia

ISOTOPICO

library(readxl)
library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.2     ✔ readr     2.1.4
✔ forcats   1.0.0     ✔ stringr   1.5.0
✔ ggplot2   3.4.2     ✔ tibble    3.2.1
✔ lubridate 1.9.2     ✔ tidyr     1.3.0
✔ purrr     1.0.1     
── 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
library(magrittr)

Attaching package: 'magrittr'

The following object is masked from 'package:purrr':

    set_names

The following object is masked from 'package:tidyr':

    extract
library(ggplot2)
datos_iso <- read_excel('datos.xlsx', sheet = 'datos_isotopicos')

Comparación de origen geográfico H

aov.geo <- aov(H ~ GEOGRAPHICAL_ORIGIN, data = datos_iso %>% filter(GEOGRAPHICAL_ORIGIN != 'METROPOLITAN REGION'))
summary(aov.geo)
                    Df Sum Sq Mean Sq F value Pr(>F)
GEOGRAPHICAL_ORIGIN  1    573   572.8   2.088   0.17
Residuals           14   3840   274.3               
ggplot(datos_iso %>% filter(GEOGRAPHICAL_ORIGIN != 'METROPOLITAN REGION'), aes(x = GEOGRAPHICAL_ORIGIN, y = H)) +
  geom_boxplot() +
  theme_minimal()

datos_iso %>% filter(GEOGRAPHICAL_ORIGIN != 'METROPOLITAN REGION') %>% 
  group_by(GEOGRAPHICAL_ORIGIN) %>% 
  summarise(n = n(),
            m = mean(H), 
            s = sd(H),
            se = s/sqrt(n),
            IC = qt(0.975, n - 1) * se) %>% 
  ggplot(aes(x = GEOGRAPHICAL_ORIGIN, y = m)) +
    geom_errorbar(aes(ymin = m - IC, ymax = m + IC), width = 0.1) +
    geom_point(col = 'red') +
    theme_minimal()

Comparación de origen geográfico C

aov.geo <- aov(C ~ GEOGRAPHICAL_ORIGIN, data = datos_iso %>% filter(GEOGRAPHICAL_ORIGIN != 'METROPOLITAN REGION'))
summary(aov.geo)
                    Df Sum Sq Mean Sq F value Pr(>F)
GEOGRAPHICAL_ORIGIN  1  0.008  0.0083   0.023  0.882
Residuals           14  5.081  0.3629               
ggplot(datos_iso %>% filter(GEOGRAPHICAL_ORIGIN != 'METROPOLITAN REGION'), aes(x = GEOGRAPHICAL_ORIGIN, y = C)) +
  geom_boxplot() +
  theme_minimal()

datos_iso %>% filter(GEOGRAPHICAL_ORIGIN != 'METROPOLITAN REGION') %>% 
  group_by(GEOGRAPHICAL_ORIGIN) %>% 
  summarise(n = n(),
            m = mean(C), 
            s = sd(C),
            se = s/sqrt(n),
            IC = qt(0.975, n - 1) * se) %>% 
  ggplot(aes(x = GEOGRAPHICAL_ORIGIN, y = m)) +
    geom_errorbar(aes(ymin = m - IC, ymax = m + IC), width = 0.1) +
    geom_point(col = 'red') +
    theme_minimal()

Correlaciones

ggplot(datos_iso, aes(x = FRAP, y = DPPH)) +
  geom_point() +
  geom_smooth(method = 'lm', se = F) +
  theme_minimal()
`geom_smooth()` using formula = 'y ~ x'

ggplot(datos_iso, aes(x = Phenolics, y = DPPH)) +
  geom_point() +
  geom_smooth(method = 'lm', se = F) +
  theme_minimal()
`geom_smooth()` using formula = 'y ~ x'

ggplot(datos_iso, aes(x = FRAP, y = Phenolics)) +
  geom_point() +
  geom_smooth(method = 'lm', se = F) +
  theme_minimal()
`geom_smooth()` using formula = 'y ~ x'