The goal of ggdnog is to provide some helpful functions for daily use at a GGD.
You can install the development version of ggdnog from GitHub with:
# install.packages("devtools")
devtools::install_github("aartdijkstra/ggdnog")Some basic helpers are:
printf()- wrapper forsprintf()which outputs the resultfreq.table()- combines the functionality oftable()andproportions()into a human-readable frequency table with included proportions and chi^2-testingdescribe()- combines the functionality ofsummary()andaggregateinto a human-readable summary of data structures. Characters and factors are automatically presented in a table, and the missing parameters fromsummary()are added for numerical types.dir_maps()- automatically traverses the directory tree searching for a specific location with mapsscale_value()andscale_axis()- allow for easy rescaling of results for a secondary y-axis in ggplot
library(ggdnog)
printf("This allows for easy printing of numbers (%d, %.1f) and other types (%s).",
5, 0.24, "like this string")
data = data.frame(weight = rnorm(100, mean=70, sd=15),
gender = c(rep("male", 50), rep("female", 50)))
describe(data, "gender")
describe(data$weight, data$gender)