[Rd] In-Out (PR#7260)

From: <mh.smith_at_niwa.co.nz>
Date: Tue 05 Oct 2004 - 09:53:06 EST


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

______________________________________________
R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue Oct 05 09:59:50 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:45:19 EST