This file contains 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
SankeyR <- function(inputs, losses, unit, labels, format="plot", | |
showPercent=TRUE, maxScale=2.5, minFont=0.5, | |
titt=""){ | |
######################## | |
# SankeyR version 1.02 (updated June 3, 2015) | |
# is a function for creating Sankey Diagrams in R. | |
# See http://www.sankey-diagrams.com for excellent examples of Sankey Diagrams. | |
# | |
# OPTIONS: | |
# 'inputs' is a vector of input values |
This file contains 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
' Excel macro to export all VBA source code in this project to text files for proper source control versioning | |
' Requires enabling the Excel setting in Options/Trust Center/Trust Center Settings/Macro Settings/Trust access to the VBA project object model | |
' modified to ask what workbook to export stuff from instead of doing it automatically for Activeworkbook. | |
Public Sub ExportVisualBasicCode() | |
Const Module = 1 | |
Const ClassModule = 2 | |
Const Form = 3 | |
Const Document = 100 | |
Const Padding = 24 | |
This file contains 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
library(plyr) | |
library(ggplot2) | |
s <- read.csv("<filename.csv>", sep=",", row.names=NULL) | |
colnames(s) <- c("date", "type", "desc", "value", "balance", "acc") | |
s$date <- as.Date(s$date, format="%d/%m/%Y") | |
s <- s[,1:5] | |
s$month <- as.Date(cut(s$date, breaks="month")) | |
s <- subset(s, s$value < 0) |