From f4e20a2df61fae124fecde973c36a80077fcc6da Mon Sep 17 00:00:00 2001 From: Robert Link Date: Thu, 21 Sep 2017 09:44:22 -0400 Subject: [PATCH] Automate production of package internal data Verified identical with old internal data. --- data-raw/sysdata.R | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 data-raw/sysdata.R diff --git a/data-raw/sysdata.R b/data-raw/sysdata.R new file mode 100644 index 0000000..c1dbaa9 --- /dev/null +++ b/data-raw/sysdata.R @@ -0,0 +1,14 @@ +## Generate the internal data for the package +## This must be sourced as a script because of the way devtools::use_data works. +## Source it from the top level of a development copy of the package. + + +source('data-raw/gdpdef.R') +gdpdef <- calc.gdpdef('data-raw/GDPDEF.csv') + +source('data-raw/energyconv.R') +energyconv <- prep.energyconv() + +devtools::use_data(gdpdef, energyconv, internal=TRUE, overwrite=TRUE, + compress='xz') +