Is it possible to create a donut chart in R? Can someone explain?
Aug 16, 2019 1,071 views

## 1 answer to this question.

@Kruthi,

Refer to this blog on how to create a pie chart, then follow the below steps.

https://www.edureka.co/community/54913/pie-chart-using-ggplot-r?show=54913#q54913

Convert the above used ggplot statement as below -

`>ggplot(mpg1,aes(x=3,y=displ,fill=as.factor(cyl)))+geom_bar(stat="identity")+coord_polar("y",start=0)+theme_void()+xlim(1,4)` In the above code xlim() zooms into a specified area and x=3 here is the row that is focused on.

See the below code and picture for better clarity.

`>ggplot(mpg1,aes(x=4,y=displ,fill=as.factor(cyl)))+geom_bar(stat="identity")+coord_polar("y",start=0)+xlim(1,7)` Hope it helps you.

answered Oct 28, 2019 by
• 33,010 points

## R programming: Drawing an xbar and R chart using qcc package

Try this: #x-Bar library(qcc) x=c(1080͵ 1390͵ 1460͵ ...READ MORE

## Show different shapes wrt a field in a scatter chart in R

Hi, I'm new to R. I want ...READ MORE

## Chart/plot to show 3 dimensions in a chart - R

Hi, I want to show chart with ...READ MORE

## Create a dual axis column/bar chart using ggplot in R

Add position = "stack" in geom_bar() function ...READ MORE

## By using dpylr package sum of multiple columns

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

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

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

## In a dpylr pipline how to use sample and seq?

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

## How to create a list of Data frames?

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