Re: Re: [R] write.dta limits

From: Andrew Stryker <stryker.a_at_comcast.net>
Date: Tue 07 Jun 2005 - 15:20:12 EST

ronggui <0034058@fudan.edu.cn> wrote on 2005-Jun-07:
> i can write the file to dta.
> > a<-matrix(rnorm(41706*229),nrow=41706)
> > a<-as.data.frame(a)
> > write.dta(a,file="c:\\new.dta")
> > version
> _
> platform i386-pc-mingw32
> arch i386
> os mingw32
> system i386, mingw32
> status Patched
> major 2
> minor 1.0
> year 2005
> month 05
> day 29
> language R
>
> OS:win 2K

Here is an example from a Linux system; I have had similar results with Windows systems.

> dim(hhtrips)
> library(foreign)
> write.dta(hhtrips, 'tmp.dta')
Error in write.dta(hhtrips, "tmp.dta") : a binary write error occurred
> version

        _
platform i686-pc-linux-gnu

arch     i686
os       linux-gnu

system i686, linux-gnu
status
major 2
minor 1.0
year 2005
month 04
day 18
language R

And here is part of the data:

> hhtrips[1:3,]

    sampn perno dayno plano wake1 wake2 locno ptype lu.type lutypo act1 act2

1 1001036     1     1     1   700    NA 9001036     1       8           3    0
2 1001036     1     1     2    NA    NA    1698     5       2          16    0
3 1001036     1     1     3    NA    NA 9001036     1       8           3    0
  act3 act4 act1o act2o arrtim deptim mode othmode party hh.mem per.trp nonhh
1   NA   NA                300   1500   NA            NA     NA            NA
2   NA   NA               1505   1630    3             0     NA             0
3   NA   NA               1635    259    3             0     NA             0
  hhveh vehno highway board bsarr acmod acmoo exit bsdep egmod egmoo route fare
1    NA    NA      NA          NA    NA               NA    NA               NA
2     1     1      NA          NA    NA               NA    NA               NA
3     1     1      NA          NA    NA               NA    NA               NA
  fpmt fpmto trpdur actdur spdflag  hhaddr areatype        phone lang bikes
1   NA           NA    720      NA 9001036        3 480-940-1364    1     0
2   NA            5     85       0 9001036        3 480-940-1364    1     0
3   NA            5    624       0 9001036        3 480-940-1364    1     0
  hhsize ethn o.ethn wrkr dweltype dwelo own o.own tenure comptr internet
1      1    1           1        1         1            2      1        1
2      1    1           1        1         1            2      1        1
3      1    1           1        1         1            2      1        1
  intacc intacco phlns faxmodem nophn length incat income oinc oinco cellp
1      1             1        0     2     NA     2      6   NA           1
2      1             1        0     2     NA     2      6   NA           1
3      1             1        0     2     NA     2      6   NA           1
  recont email emaila diffphon assn dayofwk1 dayofwk2 nstud hhpld1 hhpld2
1      1     9                  178        1        2     0      3      3
2      1     9                  178        1        2     0      3      3
3      1     9                  178        1        2     0      3      3
  pltotal hhtrpd1 hhtrpd2 trtotal  expfact weight X.merge
1       6       2       2       4 278.8232  0.957       3
2       6       2       2       4 278.8232  0.957       3
3       6       2       2       4 278.8232  0.957       3

Also, there is space left on the disk:

Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/hda2     ext3     16G  2.2G   13G  15% /
tmpfs        tmpfs    443M     0  443M   0% /dev/shm
/dev/hda1     ext2     89M  8.8M   75M  11% /boot
/dev/hdb3 reiserfs    131G   27G  104G  21% /home
/dev       unknown     16G  2.2G   13G  15% /.dev
none         tmpfs    5.0M  2.9M  2.2M  57% /dev

Andrew



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 Tue Jun 07 14:51:46 2005

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