Dear R users,> versionplatform 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.headingsThere 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. Kevin Xie -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
"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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
This is covered in the rw-FAQ. Please read it! It has been seen before, and is due to faulty software, not R. [...] -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Haifeng (Kevin) Xie <H.F.Xie01 at westminster.ac.uk> writes: [snip]>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 "?".I think you will find that any high (i.e. > decimal 127) ASCII character. This is an example of DLL hell that can plague with Windows installations. It is due to an errant version of the file msvcrt.dll. This has been covered in the FAQ that installs with R. I got round the problem by copying this file from another PC but you should be able to get a copy from the MicroSoft web site. Before copying over the existing file make a backup in case you find that your new version impacts on other applications. Mark -- Mark Myatt -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._