Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. packageStartupMessage('Compiling models (this will take a minute...)')
  2.  
  3. dest <- file.path(R_PACKAGE_DIR, paste0('libs', R_ARCH))
  4. dir.create(dest, recursive = TRUE, showWarnings = FALSE)
  5.  
  6. logistic.growth.src <- file.path(R_PACKAGE_SOURCE, 'inst', 'stan', 'prophet_logistic_growth.stan')
  7. logistic.growth.binary <- file.path(dest, 'prophet_logistic_growth.RData')
  8. logistic.growth.stanc <- rstan::stanc(logistic.growth.src)
  9. logistic.growth.stanm <- rstan::stan_model(stanc_ret = logistic.growth.stanc,
  10. model_name = 'logistic_growth')
  11. save('logistic.growth.stanm', file = logistic.growth.binary)
  12.  
  13. linear.growth.src <- file.path(R_PACKAGE_SOURCE, 'inst', 'stan', 'prophet_linear_growth.stan')
  14. linear.growth.binary <- file.path(dest, 'prophet_linear_growth.RData')
  15. linear.growth.stanc <- rstan::stanc(linear.growth.src)
  16. linear.growth.stanm <- rstan::stan_model(stanc_ret = linear.growth.stanc,
  17. model_name = 'linear_growth')
  18. save('linear.growth.stanm', file = linear.growth.binary)
  19.  
  20. packageStartupMessage('------ Models successfully compiled!')
  21. packageStartupMessage('You can ignore any compiler warnings above.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement