Re: [R] write.dta limits

From: Thomas Lumley <tlumley_at_u.washington.edu>
Date: Wed 08 Jun 2005 - 00:06:42 EST

On Tue, 7 Jun 2005, David Whiting wrote:

>
> When I have encountered this error message in the past seems to have
> resulted from a blank/empty level in a factor or an empty character.

Thanks. That is useful.

I wasn't claiming that was no bug, just that it wasn't a limit on the file size.

         -thomas

> For example:
>
>> library(foreign)
>> x <- data.frame(x=c("A", "B", "C"), y=c(1,2,3))
>> write.dta(x, file="temp.dta")
>> levels(x$x)[2]
> [1] "B"
>> levels(x$x)[2] <- ""
>> write.dta(x, file="temp.dta")
> Error in write.dta(x, file = "temp.dta") :
> a binary write error occurred
>
>
> My work-around at the time was to go through the data replacing ""
> with something else that I could then deal with later.
>
>
> --
> David Whiting
> University of Newcastle upon Tyne, UK
>

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley@u.washington.edu	University of Washington, Seattle

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jun 08 00:42:22 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:26 EST