Supress warning messages while building model

This commit is contained in:
Sean J. Taylor 2018-12-20 17:04:03 -08:00
parent 151c476030
commit 703c0731f6

View file

@ -10,11 +10,17 @@ packageStartupMessage(paste('Compiling using binary:', R.home('bin')))
model.src <- file.path(R_PACKAGE_SOURCE, 'inst', 'stan', 'prophet.stan')
model.binary <- file.path(dest, 'prophet_stan_model.RData')
model.stanc <- rstan::stanc(model.src)
model.stanm <- rstan::stan_model(
stanc_ret = model.stanc,
model_name = 'prophet_model'
)
# See: https://github.com/r-lib/pkgbuild/issues/54#issuecomment-448702834
# TODO: move stan compilation into Makevars
suppressMessages({
model.stanc <- rstan::stanc(model.src)
model.stanm <- rstan::stan_model(
stanc_ret = model.stanc,
model_name = 'prophet_model'
)
})
save('model.stanm', file = model.binary)
packageStartupMessage('------ Model successfully compiled!')