# Forzamos la carga de librerías
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.2.1     ✔ readr     2.2.0
## ✔ forcats   1.0.1     ✔ stringr   1.6.0
## ✔ ggplot2   4.0.3     ✔ tibble    3.3.1
## ✔ lubridate 1.9.5     ✔ tidyr     1.3.2
## ✔ purrr     1.2.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
library(knitr)

# Generamos los datos
set.seed(123)
df_super <- data.frame(
  ID = 1:500,
  Gasto = round(runif(500, 15, 250), 2),
  Tipo_Cliente = sample(c("Nuevo", "Ocasional", "Frecuente"), 500, replace = TRUE, prob = c(0.2, 0.5, 0.3)),
  Metodo_Pago = sample(c("Efectivo", "Tarjeta", "Transferencia", "App Móvil"), 500, replace = TRUE)
)