Re: [R] shorten str() output for long list

2009-12-04 Thread Greg Snow
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

Re: [R] shorten str() output for long list

2009-12-04 Thread Martin Maechler
"DW" == David Winsemius > on Fri, 4 Dec 2009 01:18:56 -0500 writes: DW> On Dec 3, 2009, at 10:11 PM, Peng Yu wrote: >>> x=split(1:1000,1:1000) >>> str(x) >> >> Although str() can suppress long output for vectors, but it can not >> suppress long output for l

Re: [R] shorten str() output for long list

2009-12-03 Thread Henrik Bengtsson
str(head(x)) str(head(x, n=5)) /H On Thu, Dec 3, 2009 at 10:18 PM, David Winsemius wrote: > > On Dec 3, 2009, at 10:11 PM, Peng Yu wrote: > >>> 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 wonde

Re: [R] shorten str() output for long list

2009-12-03 Thread Peng Yu
On Fri, Dec 4, 2009 at 12:18 AM, David Winsemius wrote: > > On Dec 3, 2009, at 10:11 PM, Peng Yu wrote: > >>> 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 fo

Re: [R] shorten str() output for long list

2009-12-03 Thread David Winsemius
On Dec 3, 2009, at 10:11 PM, Peng Yu wrote: 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. Very simple ... You examine the code (for str.default it's no