[R] str: how to use "no list" recursively?
Jeff Brown
dopethatwantscash at yahoo.com
Sat Apr 10 04:11:25 CEST 2010
Hi,
In the help file for str(), the following line appears: "no.list logical;
if true, no ‘list of ...’ nor the class are printed". However, that appears
to be true only on the top level; setting no.list to TRUE still leaves the
remaining levels with the `list of ...' statement intact:
> x <- list(
+ a = list(list()),
+ b = list(list())
+ );
> str(x)
List of 2
$ a:List of 1
..$ : list()
$ b:List of 1
..$ : list()
> str(x, no.list = TRUE)
$ a:List of 1
..$ : list()
$ b:List of 1
..$ : list()
>
For readability reasons, I'd like to keep the indented $ signs and the names
of the sub-lists but suppress printing of `List of ...'. Is that possible?
Thanks,
Jeff
--
View this message in context: http://n4.nabble.com/str-how-to-use-no-list-recursively-tp1820073p1820073.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list