# I tried placing the yaml block after the chunks but for some reason it doesn't always generate the pdf and generates a html file instead.
# pdf is generated when the yaml block is at the top, 

library(knitr)
opts_knit$set(root.dir="../../..") # file paths are relative to the root of the project directory
opts_chunk$set(echo=FALSE)
library(tradeflows)
library(dplyr)
library(ggplot2)
library(reshape2)
countries %>% 
    mutate(reporter2 = gsub(" ", "", reporter),
           quantity = paste0("<a href='overviewquantity",reporter2,"jfsq1.pdf'>",
                             "overviewquantity",reporter2,"</a>"),
           tradevalue = paste0("<a href='overviewtradevalue",reporter2,"jfsq1.pdf'>",
                               "overviewtradevalue",reporter2,"</a>")) %>%
    select(-reporter2) %>%
    kable(col.names = c("Reporter", "Overview quantity", "Overview trade value"))


EuropeanForestInstitute/tradeflows documentation built on Oct. 7, 2019, 10:57 a.m.