Good day. I have used ggplot
in R quite a lot. I have some basic knowledge missing about how to make pie charts in ggplot
. I want to make a pie chart for the variable puls$reykir
with percentages on the graph. The following code seems to draw a pie chart but the labeling is strange. How can I change the code in order to replace the strange labeling with a percentage in correct places instead? Here is my code:
puls <- read.table ("https://edbook.hi.is/gogn/pulsAll.csv", header=TRUE, sep=";")
ggplot(puls, aes(x = "", y = reykir, fill = reykir)) +
geom_bar(stat = "identity") +
coord_polar(theta = "y", start = 0, direction = 1)