Skip to content

Commit

Permalink
Fix printing of members that are R6 objects. Closes #88
Browse files Browse the repository at this point in the history
  • Loading branch information
wch committed Jul 1, 2016
1 parent c8f917c commit a567e86
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/print.R
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ object_summaries <- function(x, exclude = NULL) {
} else { } else {
obj <- .subset2(x, name) obj <- .subset2(x, name)
if (is.function(obj)) deparse(args(obj))[[1L]] if (is.function(obj)) deparse(args(obj))[[1L]]
else if (is.environment(obj)) "environment" # Plain environments (not envs with classes, like R6 or RefClass objects)
else if (is.environment(obj) && identical(class(obj), "environment")) "environment"
else if (is.null(obj)) "NULL" else if (is.null(obj)) "NULL"
else if (is.atomic(obj)) trim(paste(as.character(obj), collapse = " ")) else if (is.atomic(obj)) trim(paste(as.character(obj), collapse = " "))
else paste(class(obj), collapse = ", ") else paste(class(obj), collapse = ", ")
Expand Down

0 comments on commit a567e86

Please sign in to comment.