Skip to content

print: no nice error message if field is not printable #81

@gluc

Description

@gluc

c is a list and cannot be printed.

library(data.tree)
aNestedTree = 
  list(a = list(
         c = list(1:5), 
         b = 2
       ))

tree <- FromListSimple(aNestedTree)
do.call("print", c(tree, tree$fieldsAll))

The warning message is:

Warning messages:
1: In `[<-.data.frame`(`*tmp*`, colName, value = list(Root = NA, a = NA,  :
  replacement element 3 has 5 rows to replace 3 rows
2: In `[<-.data.frame`(`*tmp*`, colName, value = list(Root = NA, a = NA,  :
  provided 3 variables to replace 1 variables

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions