aimPlot {aimPlot} | R Documentation |
Pie Like Plot for Completeness
Description
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.
Usage
aimPlot(data, title, size, pct1, pct2, col1, col2, col3)
Arguments
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 |
Details
These parameters should be in the dataframe:
-
Variable
1st column: The various aims to be completed -
Percentage
2nd column: The percentage of completeness
Note
The ggplot2
package is required to run this function
Author(s)
Yusman Kamaleri, ybkamaleri@gmail.com
Source
RegData
is example data set from Norwegian Diabetes Registry
Examples
# 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)