R Studio Education

🖥️ Instalación de R, 🎨 RStudio y 🌟 Tidyverse 

📖 Lee, lee mucho 📚🌟. 



Entiende esto

df <- tibble(

  grupo = c("A", "A", "B", "B", "C", "C"),

  valor = c(10, 15, 10, 20, 5, 7)

)

df_final <- df %>%

  filter(valor > 10) %>%

  group_by(grupo) %>%

  mutate(nueva_variable = valor * 2) %>%

  summarise(

    suma = sum(nueva_variable),

    promedio = mean(valor)

  ) %>%

  mutate(variable_final = suma / promedio) 

🎨 Dibuja📚 Crea tu propia biblioteca 🌟✏️ 

Aprende a crear esto

ggplot(df_final) +

  geom_col(aes(x = grupo, y = variable_final, fill = grupo), show.legend = FALSE) +

  geom_point(aes(x = grupo, y = promedio), color = "blue", size = 3) +

  geom_text(aes(x = grupo, y = variable_final, label = round(variable_final, 2)), vjust = -0.5) +

  geom_text(aes(x = grupo, y = promedio, label = grupo), color = "blue", vjust = -0.5) +

  scale_fill_manual(values = c("red", "green", "yellow")) +

  labs(title = "Análisis Avanzado con ggplot2",

       subtitle = "Comparación de la Variable Final y el Promedio",

       x = "Grupo",

       y = "Valor",

       caption = "Fuente: Datos de ejemplo") +

  theme_minimal() +

  theme(plot.title = element_text(hjust = 0.5, size = 16, face = "bold"),

        plot.subtitle = element_text(hjust = 0.5, size = 12),

        axis.title.x = element_text(size = 12, face = "bold"),

        axis.title.y = element_text(size = 12, face = "bold"))

📊 La estadística e 🌐 internet son tus mejores amigos 🤝💡