Plot pie chart
plot_pie_chart( data, variable, filter_response = NULL, title = NULL, filllab = NULL, labels = NULL, number_font_size = 4, return = c("plot", "data") )
data | specify data file |
---|---|
variable | specify variable you want in pie chart |
filter_response | filter response options e.g. c(1:4) to get rid of other values - cleaner plot |
title | specify title |
filllab | title = "An awesome pie chart" |
labels | use to relabel value e.g. c("Male", "Female") |
number_font_size | respecify the font size in case it doesnt fit |
return | do you want to get the data or plot |
plot_pie_chart(data = iCARE, variable = sex, filter_response=c(1:2), title = "Sex distribution", labels = c("Male", "Female"), number_font_size = 6, return = "plot")#> Error in ggplot(., aes(x = "", y = n, fill = factor(value))): could not find function "ggplot"