From 025c0fec0e003eb3f2e91acf39db1c092fac414a Mon Sep 17 00:00:00 2001 From: Oliver Keyes Date: Tue, 28 Feb 2017 02:07:59 -0800 Subject: [PATCH] Syntax cleanup (#30) `=` or `<-`, not both; explicit or implicit returns..so on --- R/R/prophet.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/R/prophet.R b/R/R/prophet.R index f52e3e0..f60184e 100644 --- a/R/R/prophet.R +++ b/R/R/prophet.R @@ -182,7 +182,7 @@ compile_stan_model <- function(model) { stanc <- rstan::stanc(stan.src) model.name <- paste(model, 'growth', sep = '_') - rstan::stan_model(stanc_ret = stanc, model_name = model.name) + return(rstan::stan_model(stanc_ret = stanc, model_name = model.name)) } #' Prepare dataframe for fitting or predicting. @@ -199,7 +199,7 @@ setup_dataframe <- function(m, df, initialize_scales = FALSE) { if (exists('y', where=df)) { df$y <- as.numeric(df$y) } - df$ds = zoo::as.Date(df$ds) + df$ds <- zoo::as.Date(df$ds) df <- df %>% dplyr::arrange(ds)