library("knitr") database <- as.Date("2016-08-01") fmt_database <- format(database, "%b/%Y")
title: "Orçamento Família Paiva Vitaliano"
subtitle: "r fmt_database
"
date: "r format(Sys.Date(), "%d/%m/%Y")
"
output: pdf_document
knitr::opts_chunk$set(echo = TRUE) source("ynab_reports.R")
r.df <- loadMostRecentRegister("Data") s <- summaryYNAB(r.df, database)
r s$income.formatted
r s$expenses.formatted
r s$investments.formatted
g <- s$totals$plot + labs(title = "Números do Mês", x = fmt_database, y = "Valor") + scale_fill_discrete(name = "Tipos") g
g <- s$sumClass.month$plot + labs(title = "Gastos por classe no mês", x = "", y = "Valor") + scale_fill_discrete(name = "Classes") g
df <- s$sumClass.month$df[, c(1,3)] names(df) <- c("Classe", "Valor") kable(df, format.args = list(big.mark=".", decimal.mark = ","))
g <- s$sumClass.year$plot + labs(title = "Gastos Acumulados no Ano", x = "Meses", y = "Valor") + scale_fill_discrete(name = "Classes de Gastos") g
df <- s$sumClass.year$df kable(df, format.args = list(big.mark=".", decimal.mark = ","))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.