Skip to content

Commit 3003c22

Browse files
committed
no need so many vars
1 parent 5314615 commit 3003c22

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

R/frollapply.R

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,9 @@ simplifylist = function(x, fill, ansmask) {
3636
}
3737
}
3838
}
39-
all.t = vapply_1c(x, typeof, use.names=FALSE)
40-
all.ut = unique(all.t)
41-
l = lengths(x)
42-
ul = unique(l)
39+
all.ut = unique(vapply_1c(x, typeof, use.names=FALSE))
4340
if ((length(all.ut) == 1L) && all(all.ut %in% c("integer","logical","double","complex","character","raw"))) {
44-
if (identical(ul, 1L)) { ## length 1
41+
if (identical(unique(lengths(x)), 1L)) { ## length 1
4542
return(unlist(x, recursive=FALSE, use.names=FALSE))
4643
} else if (equal.lengths(x)) { ## length 2+ and equal
4744
return(rbindlist(lapply(x, as.list)))

0 commit comments

Comments
 (0)