From 5313a85be19389fb70b27f2f8f20c88a5ef04308 Mon Sep 17 00:00:00 2001 From: Richard Iannone Date: Sat, 23 Apr 2016 01:11:49 -0700 Subject: [PATCH] Replace certain `ifelse` statements --- R/run_model.R | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/R/run_model.R b/R/run_model.R index a900bd1c..08c5f080 100644 --- a/R/run_model.R +++ b/R/run_model.R @@ -9,18 +9,17 @@ run_model <- function(model) { if (inherits(model, "traj_model")) { + + traj_df <- hysplit_trajectory( lat = model$lat, lon = model$lon, - height = ifelse(is.null(model$height), - 50, model$height), + height = model$height, duration = ifelse(is.null(model$duration), 24, model$duration), - run_period = ifelse(is.null(model$run_period), - "2015-07-01", model$run_period), - daily_hours = ifelse(is.null(model$daily_hours), - 0, model$daily_hours), + run_period = model$run_period, + daily_hours = model$daily_hours, direction = ifelse(is.null(model$direction), "forward", model$direction), met_type = ifelse(is.null(model$met_type),