@@ -28,35 +28,35 @@ tables = function(mb=type_size, order.col="NAME", width=80L,
2828 obj = mget(names , envir = env ) # doesn't copy; mget is ok with ... unlike get, #5197
2929 found_items = list ()
3030 if (recursive ) {
31- agenda <- lapply(seq_along(obj ), function (i ) list (obj = obj [[i ]], name = names [i ]))
32- visited_env <- new.env(hash = TRUE )
31+ agenda = lapply(seq_along(obj ), function (i ) list (obj = obj [[i ]], name = names [i ]))
32+ visited_env = new.env(hash = TRUE )
3333
3434 while (length(agenda ) > 0L ) {
35- current_item <- agenda [[1L ]]
36- agenda [[1L ]] <- NULL
37- x <- current_item $ obj
38- x_name <- current_item $ name
35+ current_item = agenda [[1L ]]
36+ agenda [[1L ]] = NULL
37+ x = current_item $ obj
38+ x_name = current_item $ name
3939 if (is.data.table(x )) {
40- found_items [[length(found_items ) + 1L ]] <- list (name = x_name , obj = x )
40+ found_items [[length(found_items ) + 1L ]] = list (name = x_name , obj = x )
4141 next
4242 }
4343 if (is.list(x ) && ! is.data.frame(x )) {
4444 # Cycle detection
45- addr <- address(x )
45+ addr = address(x )
4646 if (exists(addr , envir = visited_env , inherits = FALSE )) next
4747 assign(addr , TRUE , envir = visited_env )
4848
49- item_names <- names(x )
50- children_to_add <- vector(" list" , length(x ))
49+ item_names = names(x )
50+ children_to_add = vector(" list" , length(x ))
5151 for (i in seq_along(x )) {
52- child_name <- if (! is.null(item_names ) && nzchar(item_names [i ])) {
52+ child_name = if (! is.null(item_names ) && nzchar(item_names [i ])) {
5353 paste0(x_name , " $" , item_names [i ])
5454 } else {
5555 paste0(x_name , " [[" , i , " ]]" )
5656 }
57- children_to_add [[i ]] <- list (obj = x [[i ]], name = child_name )
57+ children_to_add [[i ]] = list (obj = x [[i ]], name = child_name )
5858 }
59- agenda <- c(rev(children_to_add ), agenda )
59+ agenda = c(rev(children_to_add ), agenda )
6060 }
6161 }
6262 } else {
0 commit comments