Commit d8291404 authored by Nicolau Manubens's avatar Nicolau Manubens
Browse files

Small fix.

parent a421b8b5
......@@ -139,7 +139,6 @@
.MergeArrayDims <- function(dims1, dims2) {
new_dims1 <- c()
new_dims2 <- c()
new_dims3 <- c()
while (length(dims1) > 0) {
if (names(dims1)[1] %in% names(dims2)) {
pos <- which(names(dims2) == names(dims1)[1])
......@@ -149,13 +148,11 @@
}
new_dims1 <- c(new_dims1, dims_to_add, dims1[1])
new_dims2 <- c(new_dims2, dims2[1:pos])
new_dims3 <- c(new_dims3, dims2[1:pos])
dims1 <- dims1[-1]
dims2 <- dims2[-c(1:pos)]
} else {
new_dims1 <- c(new_dims1, dims1[1])
new_dims2 <- c(new_dims2, 1)
new_dims3 <- c(new_dims3, dims1[1])
names(new_dims2)[length(new_dims2)] <- names(dims1)[1]
dims1 <- dims1[-1]
}
......@@ -165,7 +162,6 @@
names(dims_to_add) <- names(dims2)
new_dims1 <- c(new_dims1, dims_to_add)
new_dims2 <- c(new_dims2, dims2)
new_dims3 <- c(new_dims3, dims2)
}
list(new_dims1, new_dims2, pmax(new_dims1, new_dims2))
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment