Skip to content

Commit 46af094

Browse files
committed
make lintr happy
1 parent c7d2629 commit 46af094

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

R/frollapply.R

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,7 @@ simplifylist = function(x, fill, ansmask) {
3030
all.ut = ans.ut
3131
} else if (typeof(fill) != ans.ut && all(c(typeof(fill), ans.ut) %in% c("double","integer","logical"))) { ## fill=-2, ans=1L
3232
filli = which(!ansmask)
33-
if (ans.ut == "double") {
34-
cast = as.numeric
35-
} else if (ans.ut == "integer") {
36-
cast = as.integer
37-
} else if (ans.ut == "logical") {
38-
cast = as.logical
39-
}
33+
cast = switch(ans.ut, double = as.numeric, integer = as.integer, logical = as.logical)
4034
x[filli] = rep_len(list(cast(fill)), length(filli))
4135
all.ut = ans.ut
4236
}

0 commit comments

Comments
 (0)