[R] Symbol " £ " crashs R in Win98

Uwe Ligges ligges at statistik.uni-dortmund.de
Sat Feb 16 16:52:11 CET 2002



"Haifeng (Kevin) Xie" wrote:
> 
> Dear R users,
> 
> > version
> platform i386-pc-mingw32
> arch     x86
> os       Win32
> system   x86, Win32
> status
> major    1
> minor    4.1
> year     2002
> month    01
> day      30
> language R
> 
> I was trying to read in some data in a text file. In the data file, some
> of the column headings contain the symbol "£". In order to cope with that,
> I first use "scan" to read in the column headings and then use
> "read.table" with "skip = 1" to get the rest of the data (numbers). I then
> re-associate the column headings with the resulting data frame. More
> specifically, I used:
> 
> > col.headings <- scan("myfile.txt", what = "", nlines = 1)
> > my.data <- read.table("myfile.txt", skip = 1, header = F)
> > names(my.data) <- col.headings
> 
> There was no complaint. But when I try to look at the data, e.g.,
> 
> > summary(my.data)
> 
> R crashed (illegal operation). Then I realised that: R will crash whenever
> the "£" symbol is typed. I'm using Microsoft Windows 98 SE, all settings
> regarding keyboard layout, regional setting are correct. The very same
> codes were trouble free when tried on a Linux box.
> 
> Did anybody encounter similar problem? Is this problem only associated to
> Win98 or MS Windows in general? Any way around? Well, I could have changed
> to "$" instead of sticking to "£".
> 
> Any suggestion will be greatly appreciated.

R for windows FAQs (rw-FAQ):

2.12 Entering certain characters crashes Rgui.

"This seems to happen occasionally, and all the occurrences we have
solved have been traced to faulty versions of msvcrt.dll. Try extracting
the one to be found in the self-extracting archive
ftp://ftp.microsoft.com/softlib/mslfiles/msvcrt.exe and  put it in the
rw1041\bin directory. Removing msvcrt.dll from that directory reverts to
the standard behaviour.
This fix has solved other problems too, for example incorrect results in
the date-time functions."


Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list