Skip to content

Instantly share code, notes, and snippets.

View luisDVA's full-sized avatar

Luis Verde Arregoitia luisDVA

View GitHub Profile
@luisDVA
luisDVA / ctreeCustomFuns.R
Created July 28, 2015 01:18
custom functions for plotting ctrees
# 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,
@luisDVA
luisDVA / ctreeGetData.r
Created July 28, 2015 00:43
plotting trees pt 1
# Dependencies
if(!require(party)){
install.packages("party")
library(party)
}
if(!require(dplyr)){
install.packages("dplyr")
library(dplyr)
}