[R] str() on a data frame with 600 variables

Greg Snow Greg.Snow at imail.org
Tue Apr 19 16:59:43 CEST 2011


An alternative that you may find interesting is the TkListView function in the TeachingDemos package.  This opens a separate window and shows the list structure there with options for scrolling and expanding/collapsing sublists.  You will probably need to be a little patient while the display builds for a list of that size.

-- 
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 zubin
> Sent: Friday, April 15, 2011 7:40 AM
> To: Duncan Murdoch
> Cc: r-help at r-project.org
> Subject: Re: [R] str() on a data frame with 600 variables
> 
> perfect! thx
> 
> On 4/15/2011 8:43 AM, Duncan Murdoch wrote:
> > On 15/04/2011 8:19 AM, zubin wrote:
> >> Hello..
> >>
> >> How do I get str() to show all variables in a data frame? It seems
> to be
> >> "list output truncated" at about 99 variables, the data frame has
> over
> >> 600 but i can't seem to figure out how to show all variables, we see
> >> list.len() but again can't seem to figure this out - help will be
> >> appreciated.
> >>
> >> R>  str(raw)
> >>
> >> 'data.frame': 1201 obs. of  626 variables:
> >>
> >> .
> >>
> >> .
> >>
> >> $ varXYZ            : int  0 0 0 0 0 0 0 0 0 0 ...
> >>
> >>    [list output truncated]
> >>
> > Use str(raw, list.len=1000).
> >
> > Duncan Murdoch
> >
> 
> ______________________________________________
> 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