Created
January 24, 2017 18:38
-
-
Save seanjtaylor/17f3d3df9adade9d201973e32c8cc362 to your computer and use it in GitHub Desktop.
My install.libs.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
packageStartupMessage('Compiling models (this will take a minute...)') | |
dest <- file.path(R_PACKAGE_DIR, paste0('libs', R_ARCH)) | |
dir.create(dest, recursive = TRUE, showWarnings = FALSE) | |
logistic.growth.src <- file.path(R_PACKAGE_SOURCE, 'inst', 'stan', 'prophet_logistic_growth.stan') | |
logistic.growth.binary <- file.path(dest, 'prophet_logistic_growth.RData') | |
logistic.growth.stanc <- rstan::stanc(logistic.growth.src) | |
logistic.growth.stanm <- rstan::stan_model(stanc_ret = logistic.growth.stanc, | |
model_name = 'logistic_growth') | |
save('logistic.growth.stanm', file = logistic.growth.binary) | |
linear.growth.src <- file.path(R_PACKAGE_SOURCE, 'inst', 'stan', 'prophet_linear_growth.stan') | |
linear.growth.binary <- file.path(dest, 'prophet_linear_growth.RData') | |
linear.growth.stanc <- rstan::stanc(linear.growth.src) | |
linear.growth.stanm <- rstan::stan_model(stanc_ret = linear.growth.stanc, | |
model_name = 'linear_growth') | |
save('linear.growth.stanm', file = linear.growth.binary) | |
packageStartupMessage('------ Models successfully compiled!') | |
packageStartupMessage('You can ignore any compiler warnings above.') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment