library(knitr) opts_knit$set(root.dir="../..") # file paths are relative to the root of the project directory library(tradeflows) library(dplyr)
Load data
load("data/sawnwood.RData") size1 <- file.info("data/sawnwood.RData")$size size1
Save to RDATA
# drop the product column which has large text sawnwood <- sawnwood %>% select(-product) save(sawnwood, file="data/sawnwood2.RData") size2 <- file.info("data/sawnwood2.RData")$size (size1 - size2) / size1 *100 # 6.4 % difference in file size # drop the flowcode column which has only 1, 2 and 4 values sawnwood <- sawnwood %>% select(-flowcode) save(sawnwood, file="data/sawnwood2.RData") size2 <- file.info("data/sawnwood2.RData")$size (size1 - size2) / size1 *100 # 0,1 % difference in file size
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.