Solving problems with read.fwf(), perl under WinNT (was: Re: [R] Using metric scaling)

Jens Oehlschlägel-Akiyoshi jens.oehlschlaegel-akiyoshi at
Mon Oct 18 11:11:04 CEST 1999

Some days ago a problem with perl under WinNT was reported, which lead to

> > t1 <- read.fwf("d:/maj/consulting/MarkStevens/matrix.txt", width=c(4,
> rep(7, 8)))
> Error: "scan" can't open file

I installed perl from the WindowsNt Recource Kit CD (Sept. 98) and
encountered the same problem:

Scan couldn't open the file
- because perl did not produce it
- because perl could not find it's library files
- because the installation procedure did not copy the library files to my HD
- and instead created registry entries pointing to the CD

So the solution that worked for me is
- copy RecourceKitCD:\source\gnu\perl\*.* and it's subdirectories to my HD
(e.g. C:\NTRESKIT\perl),
- change to this directory (e.g. C:\NTRESKIT\perl)
- and run INSTALL.BAT (which updates the registry approbriately)

Well, besides having some files twice in C:\NTRESKIT\perl and
C:\NTRESKIT\perl\bin (e.g. perl.exe) (check your path)
it works now.


Dr. Jens Oehlschlägel-Akiyoshi
Bayerstrasse 21

80335 München

Tel.: 089 545 28-27
Fax.: 089 545 28-10

r-help mailing list -- Read
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at

More information about the R-help mailing list