[R] write.table error

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Fri Jul 5 08:10:27 CEST 2002


You gien us nothing to reproduce this with, and other examples work.
R does have debugging tools that would allow you to investigate this.
In particular, as rownames<- is not actually used in write.table,
the result of traceback() is the minimum that is needed when reporting an
error.

Just one possbility: it should be `row.names=FALSE', and if you had a
variable called F this might be the explanation.

On 5 Jul 2002, Ross Darnell wrote:

> I am getting the following when trying to write a dataframe to a file.
>
> I would appreciate any advice to where the problem lies.
>
> Thanks
>
> Ross Darnell
> > write.table(all,file="agree.csv",row.names=F)
> Error in "rownames<-"(*tmp*, value = row.names(x)) :
>     length of dimnames[1] not equal to array extent
> > is.data.frame(all)
> [1] TRUE
> > dim(all)
> [1] 854  18
> > length(row.names(all))
> [1] 854
> >
> > R.version
>          _
> platform i686-pc-linux-gnu
> arch     i686
> os       linux-gnu
> system   i686, linux-gnu
> status
> major    1
> minor    5.0
> year     2002
> month    04
> day      29
> language R
> >
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list