Re: [R] printing a data.frame that contains a list-column of S4 objects

2016-01-14 Thread Martin Maechler
> boB Rudis > on Tue, 12 Jan 2016 13:51:50 -0500 writes: > I wonder if something like: > format.list <- function(x, ...) { > rep(class(x[[1]]), length(x)) > } > would be sufficient? (prbly needs more 'if's though) Dear Jenny, for a different

Re: [R] printing a data.frame that contains a list-column of S4 objects

2016-01-14 Thread boB Rudis
Martin, I'm pretty sure the use of Matrix here (actually by someone else than Dr Bryan) was to make an easy, inline, reproducible example. The actual "ugh" column comes from using git2r. I'm assuming there's an API call returning some pretty gnarly structures that are getting shoehorned into a

Re: [R] printing a data.frame that contains a list-column of S4 objects

2016-01-12 Thread boB Rudis
I wonder if something like: format.list <- function(x, ...) { rep(class(x[[1]]), length(x)) } would be sufficient? (prbly needs more 'if's though) On Tue, Jan 12, 2016 at 12:15 PM, Jenny Bryan wrote: > Is there a general problem with printing a data.frame when it has a >

[R] printing a data.frame that contains a list-column of S4 objects

2016-01-12 Thread Jenny Bryan
Is there a general problem with printing a data.frame when it has a list-column of S4 objects? Or am I just unlucky in my life choices? I ran across this with objects from the git2r package but maintainer Stefan Widgren points out this example below from Matrix as well. I note that the offending