\fontfamily{lmss}\selectfont
knitr::opts_chunk$set(warning=FALSE, message=FALSE) text = params$text author = params$author email = params$email logo = params$logo url = params$url
library(BETS)
\def\haslogo{r as.integer(!is.na(logo))
}
\def\haswebsite{r as.integer(!is.na(url))
}
\def\hastext{r as.integer(!is.na(text))
}
\fancypagestyle{plain}{
\fancyhf{}%
\setlength{\headheight}{45pt}
\fancyhead[L]{
\includegraphics[width=\linewidth,height=40pt]{logo_situation} }
\ifnum\hastext = 1
\fancyhead[R]{
{\fontfamily{lmss}\selectfont
{\footnotesize Analysis by} \
\ifnum\haslogo = 1
\includegraphics[width=\linewidth,height=35pt]{r logo
} \
\else
r author
\
\fi
\ifnum\haswebsite = 1
{\small \url{r url
}}
\fi
}
}
\fi
\fancyfoot[L]{
{\fontfamily{lmss}\selectfont
{\small Charts generated by the \textbf{BETS R Package} on r Sys.Date()
$\diamond$ \textbf{\url{https://github.com/pedrocostaferreira/BETS}}}}
}
\fancyfoot[R]{
\thepage\ / \pageref{LastPage} }
}
\pagestyle{plain}
dir.create("graphs") chart(ts = "ipca_with_core", file = "ipca.pdf", open = FALSE)
chart(ts = "ulc", file = "ulc.pdf", open = FALSE)
\begin{figure}[h] \begin{subfigure}{.49\textwidth} \centering \includegraphics[width=1\linewidth]{graphs/ipca} \label{ipca} \end{subfigure} ~ \begin{subfigure}{.49\textwidth} \centering \includegraphics[width=1\linewidth]{graphs/ulc} \label{cut} \end{subfigure} \end{figure}
if(!is.na(text)){ text <- paste(readLines(text), collapse=" ") text = gsub(pattern = "\\\\n", replacement = " \n", x = text) text <- strsplit(text, "##")[[1]] cat(text[1]) }
\ifnum\hastext = 1 \newpage \pagestyle{plain} \fi
chart(ts = "eap", file = "eap.pdf", open = FALSE)
chart(ts = "unemp", file = "unemp.pdf", open = FALSE)
\begin{figure}[h] \begin{subfigure}{.49\textwidth} \centering \includegraphics[width=1\linewidth]{graphs/eap} \label{ipca} \end{subfigure} ~ \begin{subfigure}{.49\textwidth} \centering \includegraphics[width=1\linewidth]{graphs/unemp} \label{cut} \end{subfigure} \end{figure}
if(!is.na(text)){ cat(text[2]) }
\newpage \pagestyle{plain}
chart(ts = "vargdp", file = "vargdp.pdf", open = FALSE)
chart(ts = "indprod", file = "indprod.pdf", open = FALSE)
\begin{figure}[h] \begin{subfigure}{.49\textwidth} \centering \includegraphics[width=1\linewidth]{graphs/vargdp} \label{ipca} \end{subfigure} ~ \begin{subfigure}{.49\textwidth} \centering \includegraphics[width=1\linewidth]{graphs/indprod} \label{cut} \end{subfigure} \end{figure}
if(!is.na(text)){ cat(text[3]) }
\ifnum\hastext = 1 \newpage \pagestyle{plain} \fi
chart(ts = "selic", file = "selic.pdf", open = FALSE)
chart(ts = "cdb", file = "cdb.pdf", open = FALSE)
\begin{figure}[h] \begin{subfigure}{.49\textwidth} \centering \includegraphics[width=1\linewidth]{graphs/selic} \label{ipca} \end{subfigure} ~ \begin{subfigure}{.49\textwidth} \centering \includegraphics[width=1\linewidth]{graphs/cdb} \label{cut} \end{subfigure} \end{figure}
if(!is.na(text)){ cat(text[4]) }
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.