Wow, those are cool functions!  Thanks!

--- On Sat, 4/10/10, Henrique Dallazuanna [via R] 
<ml-node+1835454-939980203-179...@n4.nabble.com> wrote:

From: Henrique Dallazuanna [via R] 
<ml-node+1835454-939980203-179...@n4.nabble.com>
Subject: Re: str: how to use "no list" recursively?
To: "Jeff Brown" <dopethatwantsc...@yahoo.com>
Date: Saturday, April 10, 2010, 12:02 PM



Try this:


cat(gsub(":List of .*", "", capture.output(str(x, no.list = TRUE))), sep = '\n')


On Fri, Apr 9, 2010 at 11:11 PM, Jeff Brown <[hidden email]> wrote:

>

> 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.

>

> ______________________________________________

> [hidden email] mailing list

> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

>



-- 

Henrique Dallazuanna

Curitiba-Paraná-Brasil

25° 25' 40" S 49° 16' 22" O


______________________________________________

[hidden email] mailing list

https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.







View message @ 
http://n4.nabble.com/str-how-to-use-no-list-recursively-tp1820073p1835454.html


To unsubscribe from str: how to use "no list" recursively?, click here.







-- 
View this message in context: 
http://n4.nabble.com/str-how-to-use-no-list-recursively-tp1820073p1835747.html
Sent from the R help mailing list archive at Nabble.com.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to