This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Package load | |
library(dplyr) | |
library(reshape2) | |
library(ggplot2) | |
library(devtools) | |
install_github('timcdlucas/palettetown') | |
library(palettetown) | |
# read the data directly from the repo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# custom barplot function to alter the appearance of terminal nodes | |
# modified from code provided by Achim Zeileis to the R-help mailing list | |
# source the function and assign it as a grapcon_generator object | |
node_barplot2 <- function(ctreeobj, | |
col = "black", | |
fill = c("red", "white"), | |
beside = NULL, | |
ymax = NULL, | |
ylines = NULL, | |
widths = 1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dependencies | |
if(!require(party)){ | |
install.packages("party") | |
library(party) | |
} | |
if(!require(dplyr)){ | |
install.packages("dplyr") | |
library(dplyr) | |
} |
NewerOlder