Fw: [R] write.table only writes the first 256 variables/columns
stuart.leask at nottingham.ac.uk
Fri May 23 16:43:49 CEST 2003
Thanks. I was "believing" an Excel import of the file - as you say, a
into R still has 333 columns. I shall look elsewhere for the cause of the
> ----- Original Message -----
> From: "Thomas Lumley" <tlumley at u.washington.edu>
> To: "Stuart Leask" <stuart.leask at nottingham.ac.uk>
> Cc: "R-Help" <r-help at stat.math.ethz.ch>
> Sent: Friday, May 23, 2003 2:50 PM
> Subject: Re: [R] write.table only writes the first 256 variables/columns
> > On Fri, 23 May 2003, Stuart Leask wrote:
> > > Hi there.
> > > Using read.spss I can read in a file 333 columns, 280 lines, but if I
> > > write.table to export it, I only get 256 columns x 280 lines. I can't
> > > this feature documented anywhere...
> > >
> > I can't replicate this:
> > > foo<-matrix(rnorm(333*280), ncol=333, nrow=280)
> > > foo<-as.data.frame(foo)
> > > write.table(foo,"foo.txt")
> > > bar<-read.table("foo.txt",header=TRUE)
> > > dim(bar)
> >  280 333
> > > all.equal(foo,bar)
> >  TRUE
> > and I can't see why it would be true. Does this example work for you?
> > The largest SPSS file I have lying around has only 212 columns, so I
> > can't test the read.spss aspect of it.
> > -thomas
More information about the R-help