ENVEZ DE SUM USÉ MEDIAN QUE ES LO QUE ME CONVIENE, GRACIAS!!
library(readxl)
ta <- read_excel("C:/Users/betan/Desktop/presiones.xlsx")
attach(ta)
'
ta %>%
pivot_longer(cols = names(ta)) %>%
group_by(name) %>%
summarise(median(value)) %>%
ungroup() %>%
mutate( valor = `median(value)`) %>%
ggplot() +
geom_bar(aes(y = valor, x = name, fill = name), stat = 'identity')
El 9/5/22, Juan Abasolo <[email protected]> escribió:
> Seguro que te lo saben resolver muchísimo más elegante.
> Pero si te sirve para desatascarte, acá mi ejercicio
>
> Suerte
>
> library(tidyverse)
> dtk <- read.csv('data/raw/presiones.csv',
> sep = ',', dec = ',')
>
> dtk %>%
> pivot_longer(cols = names(dtk)) %>%
> group_by(name) %>%
> summarise(sum(value)) %>%
> ungroup() %>%
> mutate( valor = `sum(value)`) %>%
> ggplot() +
> geom_bar(aes(y = valor, x = name, fill = name), stat = 'identity')
>
>
>
>
> Hau idatzi du Jose Betancourt Bethencourt ([email protected])
> erabiltzaileak (2022 mai. 9, al. (14:24)):
>
>> Estimados
>>
>> ?Como se hace un gráfico de barras con este archivo que adjunto en
>> que cada barra represente a una columna y tenga diferente color?
>> -- saludos
>> José
>> _______________________________________________
>> R-help-es mailing list
>> [email protected]
>> https://stat.ethz.ch/mailman/listinfo/r-help-es
>>
>
>
> --
> Juan Abasolo, PhD
>
> Hizkuntzaren eta Literaturaren Didaktika Saila | EUDIA ikerketa taldea
> Bilboko Hezkuntza Fakultatea
> Euskal Herriko Unibertsitatea UPV/EHU
>
> Sarriena auzoa z/g 48940 - Leioa (Bizkaia)
>
> T : (+34) 94 601 7567
> Telegram: @JuanAbasolo
> Skype : abasolo72
>
--
Dr. Jose A. Betancourt Bethencourt
Universidad de Ciencias Medicas Carlos j. Finlay
_______________________________________________
R-help-es mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-help-es