[Rd] In-Out (PR#7260)

mh.smith at niwa.co.nz mh.smith at niwa.co.nz
Tue Oct 5 01:53:06 CEST 2004


Full_Name: Murray H Smith
Version: 1.9.1
OS: Windows 2000
Submission from: (NULL) (202.36.29.1)


write.table has a problem when the data frame has columns of mode numeric 
and complex. All columns are written in complex mode. If other modes are 
present the problem does not occur. 

> write.table(data.frame(x = 1:4, y = 1:4 + 1i), file = "test")
> read.table("test")
     x    y
1 1+0i 1+1i
2 2+0i 2+1i
3 3+0i 3+1i
4 4+0i 4+1i

> write.table(data.frame(x = 1:4, y = 1:4 + 1i, z = "a"), file = "test")
> read.table("test")
  x    y z
1 1 1+1i a
2 2 2+1i a
3 3 3+1i a
4 4 4+1i a



More information about the R-devel mailing list