Skip to content

Commit

Permalink
Replace certain ifelse statements
Browse files Browse the repository at this point in the history
  • Loading branch information
rich-iannone committed Apr 23, 2016
1 parent 7ab8e24 commit 5313a85
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions R/run_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 5313a85

Please sign in to comment.