How can I add line to show mean for each barplot not for all dataset

0 votes
Hi all, how can I add line to show mean for each barplot, not for all dataset?
Aug 29, 2019 in Data Analytics by ranjith
616 views

1 answer to this question.

0 votes

Hey ranjith, 

Use geom_hline() function to add reference lines in the same ggplot object.

Ex:

geom_hline(aes(yintercept = wt, colour = wt), mean_wt)
answered Oct 14, 2019 by Cherukuri
• 33,030 points

Related Questions In Data Analytics

0 votes
1 answer

How can I use R to list all files with a specified extension ?

fls <- list.files(pattern = "\\.dbf$") $ at the ...READ MORE

answered May 11, 2018 in Data Analytics by zombie
• 3,790 points
904 views
0 votes
1 answer

How can I reactively add actionButtons to the tableOutput?

Use DT for this purpose: library(shiny) library(DT) ui <- fluidPage( ...READ MORE

answered Dec 6, 2018 in Data Analytics by Maverick
• 10,840 points
1,212 views
0 votes
0 answers

How can I create a graph for R? (barplot)

I want to draw a graph of ...READ MORE

Apr 10, 2020 in Data Analytics by anonymous
• 120 points
524 views
0 votes
1 answer

How to find out the sum/mean for multiple variables per group in R?

You can use the reshape2 package for ...READ MORE

answered Apr 12, 2018 in Data Analytics by DataKing99
• 8,250 points
3,864 views
0 votes
1 answer

By using dpylr package sum of multiple columns

Basically here we are making an equation ...READ MORE

answered Apr 5, 2018 in Data Analytics by DeepCoder786
• 1,720 points
2,268 views
0 votes
1 answer

How to convert a text mining termDocumentMatrix into excel or csv in R?

By assuming that all the values are ...READ MORE

answered Apr 5, 2018 in Data Analytics by DeepCoder786
• 1,720 points
1,963 views
0 votes
1 answer

In a dpylr pipline how to use sample and seq?

For avoiding rowwise(), I prefer to use ...READ MORE

answered Apr 6, 2018 in Data Analytics by DeepCoder786
• 1,720 points

edited Jun 9, 2020 by Gitika 1,203 views
0 votes
1 answer

How to create a list of Data frames?

Basically all we have to do is ...READ MORE

answered Apr 9, 2018 in Data Analytics by DeepCoder786
• 1,720 points
1,402 views
0 votes
1 answer

How to put border for all legends together and separate borders for each legend in ggplot?

Hi Anitha, There are 2 functions used to ...READ MORE

answered Jul 24, 2019 in Data Analytics by Cherukuri
• 33,030 points
5,418 views
0 votes
1 answer

How to add ggplot over each other?

Do you mean to add multiple geom ...READ MORE

answered Nov 3, 2019 in Data Analytics by anonymous
• 33,030 points
657 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP