Question

Find mean and sd in Iris data set and draw graph

I need to find for every numeric variable in Iris data set mean and standard deviation by Species and draw that in ggplot2 graph with geom_col and geom_errorbar.


This is what I got so far


library(tidyverse)
data(Iris)
iris %>% 
  group_by(Species) %>% 
    summarise_if(is.numeric, list(mean = mean, sd = sd)) -> IrisData

I tried to create a graph but I don't know how to use the geom_errorbar

IrisData %>%
  select(Species, ends_with("mean")) %>%
  gather(key, val, 2:5) %>%
  ggplot(aes(key, val, fill = Species)) +
  geom_col()


0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
Find mean and sd in Iris data set and draw graph
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • Hi! I know I don't include the data set I am working with in SAS 9.4,...

    Hi! I know I don't include the data set I am working with in SAS 9.4, but I was wondering if someone could show me an example as to how this would look. I know from the directions that I am supposed to have an output statement, but I'm honestly not sure how to find the min, median, mean, and max using proc univariate. Any help would be appreciated. 4. Use a procedure to create summary statistics for the working...

  • Assignment For each set of data, find the mean, median, interquartile range, and mean absolute deviation....

    Assignment For each set of data, find the mean, median, interquartile range, and mean absolute deviation. Then draw a Box and Whisker Plot. Make sure you label your number lines before drawing your Box and Whisker Plots. Use graphic organizers attached. ria organized a can food drive for a ten-day |2. Johnathan has missed several days of class. 1. Ma community project challenge. She has to report how well she did during this time. She recorded wants to know how...

  • please draw a graph that best represents the data and please read everything to know what...

    please draw a graph that best represents the data and please read everything to know what it's about. i am confused and i need help Graphing Assignment 1: Representing the distribution of frequencies or values in a population Assignment Instructions 1. Read all of the background information about the data. 2. Read all of the tips about choosing what type of graph to draw. 3. Draw a graph that shows the distribution of tail length in a population of male...

  • Hi, See the data set below. Based on this, Excel comes with the following analysis (paired diffe...

    Hi, See the data set below. Based on this, Excel comes with the following analysis (paired difference). I need to calculate a 95% confidence interval. Based on this, I came to the following formula: [Mean of the difference (D-mean) +/ t(alpha/2) * Sd / sqrt(n)]. I can fill in the following information: D-mean = 27-34 = -7. t(alpha/2) = 2,262 sqrt(n) = sqrt(10) Do you now how I can find the standard deviation of the sample? (Sd) I think it...

  • Part I. Create a library check-out database using Microsoft SQL Server that stores data about books,...

    Part I. Create a library check-out database using Microsoft SQL Server that stores data about books, patrons, and the check-out process. Books (BookID, BookName, Author, YearPublished) Patrons (PatronsID, PatronsName, PatronsAddress, PatronsBirthday) CheckInOut (TransactionID, PatronID, BookID, CheckOutDate, NumDay, ReturnDate, Late, Fees, Paid) - the NumDay field contains the number of days patrons can keep the book, if the return date is over the number of day, then the Late field will have a Y value and a fee of $1.00 per...

  • Unit 6 Lesson 3 Classwork (Adapted from Math Vision Project) Data Distribution A lot of information...

    Unit 6 Lesson 3 Classwork (Adapted from Math Vision Project) Data Distribution A lot of information can be obtained from looking at data plots and their distributions. It is important when describing data that we use context to communicate the shape, center, and spread. Shape and spread: Modes: uniform (evenly spread- no obvious mode), unimodal (one main peak), bimodal (two main peaks), or multimodal (multiple locations where the data is relatively higher than others). Skewed distribution: when most data is...

  • This Test: 45 pts pos Find the indicated z-scores shown in the graph Click to view.page...

    This Test: 45 pts pos Find the indicated z-scores shown in the graph Click to view.page 1 of the Standard Normal Table The z-scores are Use a comma to separate answers as needed Round to two decimal places as needed ) Find the indicated probability using the standard normal distribution. P(z > 2.02) Click here to view page 1 of the standard normal table, Click here to view page 2 of the standard normal table P(Z> 2.02)(Round to four decimal...

  • Could anyone help add to my python code? I now need to calculate the mean and...

    Could anyone help add to my python code? I now need to calculate the mean and median. In this programming assignment you are to extend the program you wrote for Number Stats to determine the median and mode of the numbers read from the file. You are to create a program called numstat2.py that reads a series of integer numbers from a file and determines and displays the following: The name of the file. The sum of the numbers. The...

  • Kyle Ritter, Manager of the Strategic Sourcing Group (SSG) at Velocity Oil & Gas Company, sat...

    Kyle Ritter, Manager of the Strategic Sourcing Group (SSG) at Velocity Oil & Gas Company, sat at his desk and ran through his briefing points for his meeting later in the day. Kyle was the manager of the first-ever SSG at Velocity. A year ago, he had left a promising career as a purchasing manager with a consumer-packaged goods firm back in the mid-west for a complete change of scenery, geography (Denver), and profession (oil and gas exploration and production,...

  • Why did the Energy Telematics project fail and why was Joel's tram vaught off guard by...

    Why did the Energy Telematics project fail and why was Joel's tram vaught off guard by the hostile reaction of the truck drivers at the Omaha depot? MINI CASE Working Smarter at Continental Furniture International Joel Parsons hurried down the hall to the monthly executive committee meeting doing a mental checklist of all the things he was responsible for: sales analysis-check; mar keting stats-check; quarterly and YTD financials-check; operating statistics-check trends in each of these areas-check. Parsons was right hand...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT