Skip to content

Commit

Permalink
Fix data.table 1.9.5 related issue: Rdatatable/data.table#1216
Browse files Browse the repository at this point in the history
  • Loading branch information
markriseley committed Jul 24, 2015
1 parent c144ac8 commit 5fe6dad
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/R/tmGenerateRect.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,13 @@ tmGenerateRect <- function(datlist, vps, indexList, algorithm) {
if (i!=1) {
active <- datlist$l==i
parents_active <- datlist$l==(i-1)

parent_names <- apply(datlist[, paste0("index", 1:(i-1)), with=FALSE],
iminusone <- i-1 # added to resolve with=FALSE clash
# https://github.com/Rdatatable/data.table/issues/1216
parent_names <- apply(datlist[, paste0("index", 1:iminusone), with=FALSE],
1, paste, collapse="_")
# original code
# parent_names <- apply(datlist[, paste0("index", 1:(i-1)), with=FALSE],
# 1, paste, collapse="_")

parents1 <- parent_names[active]
parents2 <- parent_names[parents_active]
Expand Down

0 comments on commit 5fe6dad

Please sign in to comment.