You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Voila, a pie chart showing the proportions of this data according to these two classes of mushrooms. It's quite important to get the order of the labels correct, especially here, so be sure to verify the order with which the label array is built!
91
89
@@ -97,26 +95,29 @@ A somewhat more visually interesting pie chart is a donut chart, which is a pie
97
95
98
96
Take a look at the various habitats where mushrooms grow:
99
97
100
-
```python
101
-
habitat=mushrooms.groupby(['habitat']).count()
102
-
habitat
98
+
```r
99
+
habitat=mushrooms %>%
100
+
group_by(habitat) %>%
101
+
summarise(count=n())
102
+
View(habitat)
103
103
```
104
-
Here, you are grouping your data by habitat. There are 7 listed, so use those as labels for your donut chart:
0 commit comments