简体   繁体   中英

R ggplot2 geom_boxplot horizontal bars

I am very new to R and I wanted to use a box and whisker chart in my power bi dashboard and the custom visualisation for this was very slow for the volume of data.

I got the same data I am using in power bi from a mssql 2012 database and tried the same code in R studio. I get the box and whisker chart but all I get is horizontal bars. I am using the below code. SecondsOpen is still a num in the data frame as I had read this can get set to factor.

When I calculate median and average and percentiles via functions in power bi it all works ok. I am clearly doing something wrong but as I am so new to RI am struggling to see what.

library(ggplot2)
ggplot(res,aes(month_start_date,'SecondsOpen')) +geom_boxplot()

Box and whisker Image 盒子和晶须图像

Dataframe Datatypes Image 数据框数据类型图像

啊,它是“ SecondsOpen”,应该是SecondsOpen!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM