[R] Problems with read.table()

Simon Fear Simon.Fear at synequanon.com
Mon Dec 22 10:52:30 CET 2003


This is a known bug (PR #3234), only affects Win98.

The problem is the degree sign (or any nonstandard ASCII)
in your first line (7SALNIG°)

Mostly you can actually read these things in OK, but R crashes 
on printing. I get round it sometimes using something like

dedegree <- function(x) gsub("°", "deg", x)

applied to the "offending" variables after reading in.

Having said that,  I, like you, have sometimes had the crash 
on read (but not reproducibly as there are strict confidentiality
issues on my datasets). In that case you will have to edit the
data source file before reading it into R.

> -----Original Message-----
> From: Helmut Kudrnovsky [mailto:hellik at web.de]
> Sent: 22 December 2003 09:29
> To: r-help at stat.math.ethz.ch
> Subject: [R] Problems with read.table()
> 
> 
> Security Warning: 
> If you are not sure an attachment is safe to open please contact  
> Andy on x234. There are 0 attachments with this message. 
> ________________________________________________________________ 
>  
> R version 1.8.1, OS Windows 98
> 
> Dear colleagues,
> 
> if I import vegetation data (first row with column labels and 
> first column 
> with row labels) like
> 
> 7MYRGERM;7AGRGIGA;7DRYOCTO;5MYRGERM;7SALELEA;7CHOCHON;7SALNIG°;.......
> t401;5;2;2;3;4;2;2;2;1;2;1;2;2;1;2;2;2;1;2;1;0;0;......
> t403;3;0;0;6;4;0;3;0;0;3;0;0;0;0;3;0;0;0;2;0;2;0;.....
> 
> with read.table("data.file", header=TRUE, separator=";"), the 
> R program 
> crashes with following error message:
> 
> RGUI verursachte einen Fehler durch eine ungültige Seite
> in Modul R.DLL bei 015f:6b515b87.
> Register:
> EAX=0075007a CS=015f EIP=6b515b87 EFLGS=00010246
> EBX=01bd3f57 SS=0167 ESP=0073ed20 EBP=0073ed48
> ECX=01bd3ad8 DS=0167 ESI=00000001 FS=2237
> EDX=ffffffb0 ES=0167 EDI=00000008 GS=0000
> Bytes bei CS:EIP:
> 0f b7 04 50 83 e0 08 eb ce 89 5d ec eb 8b 89 74
> Stapelwerte:
> 00000000 0073ee20 019ea008 00000007 00002000 0000003b 
> 000000b0 0073ee20 
> 00000006 01bd5f58 0073edb8 6b5162ef 00000010 00000001 
> 0073ed8c 0073ee20
> 
> with greetings from Tyrol
> Helmut Kudrnovsky
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>  
 
Simon Fear 
Senior Statistician 
Syne qua non Ltd 
Tel: +44 (0) 1379 644449 
Fax: +44 (0) 1379 644445 
email: Simon.Fear at synequanon.com 
web: http://www.synequanon.com 
  
Number of attachments included with this message: 0 
  
This message (and any associated files) is confidential and\...{{dropped}}




More information about the R-help mailing list