Syntax cleanup (#30)

`=` or `<-`, not both; explicit or implicit returns..so on
This commit is contained in:
Oliver Keyes 2017-02-28 02:07:59 -08:00 committed by Ben Letham
parent 443d475468
commit 025c0fec0e

View file

@ -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)