Title: | Create Pie Like Plot for Completeness |
Version: | 1.0.0 |
Description: | Create a pie like plot to visualise if the aim or several aims of a project is achieved or close to be achieved i.e the aim is achieved when the point is at the center of the pie plot. Imagine it's like a dartboard and the center means 100% completeness/achievement. Achievement can also be understood as 100% coverage. The standard distribution of completeness allocated in the pie plot is 50%, 80% and 100% completeness. |
Depends: | R (≥ 3.2.0), utils |
Imports: | ggplot2 (≥ 2.1.0) |
Suggests: | grid, gridExtra |
License: | GPL-2 |
LazyData: | true |
RoxygenNote: | 5.0.1 |
NeedsCompilation: | no |
Packaged: | 2016-04-22 07:54:42 UTC; yuskam |
Author: | Yusman Kamaleri [aut, cre] |
Maintainer: | Yusman Kamaleri <ybkamaleri@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2016-04-22 13:09:49 |
RegData as sample data
Description
A sample data for completeness of different aims in a projects. The variables are as follows:
Usage
RegData
Format
RegData
consist of 2 columns:
Variable: The specific aims or objectives
Percentage: The percentage of completeness
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)