mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-11-16 08:38:30 +00:00
Supress warning messages while building model
This commit is contained in:
parent
151c476030
commit
703c0731f6
1 changed files with 11 additions and 5 deletions
|
|
@ -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!')
|
||||
|
|
|
|||
Loading…
Reference in a new issue