Last active
April 20, 2022 20:19
-
-
Save juanchiem/e31aba772955f5073455159dee469945 to your computer and use it in GitHub Desktop.
Manipulación de dataset conteniendo varias enfermedades / métricas para rápida exploración global
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
wide <- read.csv("https://raw.githubusercontent.com/juanchiem/agro_data/master/multiple_dis_metric.csv", | |
sep = ",") %>% as.tibble() | |
wide | |
wide %>% | |
pivot_longer( | |
cols = contains("_"), | |
names_to="var", | |
values_to='val') %>% | |
separate(var, c('enf', 'metric'), | |
sep = '_', convert = TRUE)->long | |
long | |
long %>% | |
ggplot()+ | |
aes(x=factor(trt), y=val)+ | |
geom_point(aes(col=factor(bk)))+ | |
facet_wrap(.~ enf*metric, scales = "free_y")+ | |
stat_summary(fun = "mean", geom = "crossbar") |
Author
juanchiem
commented
Mar 17, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment