[R] shorten str() output for long list

Greg Snow Greg.Snow at imail.org
Fri Dec 4 19:14:09 CET 2009


An alternative to str is the TkListView function in the TeachingDemos package.  You still get the long listing, but it is in a separate window that you can control the scrolling on by hand.  For more complicated lists/objects it provides a tree structure so that you can look at only the detailed parts that you are interested in.

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Peng Yu
> Sent: Thursday, December 03, 2009 8:11 PM
> To: r-help at stat.math.ethz.ch
> Subject: [R] shorten str() output for long list
> 
> > x=split(1:1000,1:1000)
> > str(x)
> 
> Although str() can suppress long output for vectors, but it can not
> suppress long output for list. I'm wondering how to suppress the
> output for long lists.
> 
> ______________________________________________
> R-help at 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.




More information about the R-help mailing list