Re: [R] Non-standard characters in Ascii-Files

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Mon 29 Aug 2005 - 22:39:14 EST

"Schneider, Manuel" <Manuel.Schneider@eawag.ch> writes:

> Dear R-list
>
> In R 2.1.1 under Win XP on a P4 with 2GB Ram when typing
> > temp<-matrix(c(1:16000000),4000,4000)
> > write(file="temp.txt", temp)
> > scan("temp.txt")
>
> I receive:
> Error in scan("temp.txt") : scan() expected 'a real', received '414851'
>
> The motivation for evoquing this meassage is that I am getting the same
> meassage with exported Ascii-Files from the GIS. The files contain very
> few, randomly scattered non-standard Ascii-characters. This seems to be
> a local problem on my machine but I do not have a clue on the reason
> (OS, Memory, HD?) nor who to ask.
> So, my apologies for misusing this list and many thanks for any
> suggestion.

I tried this on a Linux box (with a somewhat outdated R version though), and apart from eating up memory and disk space, nothing untoward seems to happen:

> temp<-matrix(c(1:16000000),4000,4000)
> write(file="/tmp/temp.txt", temp)
> dummy <- scan("/tmp/temp.txt")
Read 16000000 items

I'd suspect your harddisk or the disk controller...

-- 
   O__  ---- Peter Dalgaard             ุster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)                  FAX: (+45) 35327907

______________________________________________
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 Mon Aug 29 22:45:58 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:39:57 EST