Skip to content

Commit 74ca32d

Browse files
author
Leo Bastos
committed
changing order of the bins_age warning
1 parent 4405944 commit 74ca32d

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

R/nowcasting_inla.R

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,8 @@ nowcasting_inla <- function(dataset,
127127
message("Nowcasting only")
128128
}
129129
}
130-
## Missing age column warning
131-
if(missing(bins_age)){
132-
bins_age <- "SI-PNI"
133-
warning("Using 'SI-PNI' age bins!")
134-
}else{
135-
bins_age<-bins_age
136-
message("Using age bins inputed")
137-
}
138-
## Missing trim.data warning
130+
131+
## Missing trim.data warning
139132
if(missing(trim.data)){
140133
trim.data <- 0
141134
warning("Using default to trim dates, 'trim.data = 0'")
@@ -175,6 +168,14 @@ nowcasting_inla <- function(dataset,
175168
## Missing age_col warning
176169
if(missing(age_col)){
177170
warning("'age_col' missing, nowcasting with unstructured model")
171+
## Missing bins_age column warning
172+
if(missing(bins_age)){
173+
bins_age <- "SI-PNI"
174+
warning("Using 'SI-PNI' age bins!")
175+
}else{
176+
bins_age<-bins_age
177+
message("Using age bins inputed")
178+
}
178179
}else{
179180
message("'age_col' inputed, nowcasting with structured model")
180181
}

0 commit comments

Comments
 (0)