aimPlot {aimPlot} | R Documentation |
Create a pie like plot to visualize how close a project is to completeness or achievement of the aims. The middle point show the total completeness of the aim. Imagine it's like a dartboard and the center means 100% completeness/achievement. The standard distribution for the proportion of completeness allocated in the pie is 50%, 80% and 100%. Items for aim should be on the first row and the percentage of each items is on the second row in the data set.
aimPlot(data, title, size, pct1, pct2, col1, col2, col3)
data |
Data set |
title |
Title for the plot |
size |
Size of the point |
pct1 |
Percentage first pie proportion |
pct2 |
Percentage second pie proportion |
col1 |
Colour of the first pie proportion |
col2 |
Colour of the second pie proportion |
col3 |
Colour of the third pie proportion |
These parameters should be in the dataframe:
Variable
1st column: The various aims to be completed
Percentage
2nd column: The percentage of completeness
The ggplot2
package is required to run this function
Yusman Kamaleri, ybkamaleri@gmail.com
RegData
is example data set from Norwegian Diabetes Registry
# basic usage
library("aimPlot")
aimPlot(data = RegData, title = "Plot title")
aimPlot(RegData, "Plot title", size=10, col1="blue", col2="green", col3="yellow")
aimPlot(RegData, pct1 = 20, pct2 = 60)