[R] Using metric scaling
Murray Jorgensen
maj at waikato.ac.nz
Sun Oct 10 23:05:33 CEST 1999
Prof B. Ripley wrote:
>With that sort of structure it will be painful. I assume some extra
>line wrapping occurred in transit? If so, here is my best idea:
>
>t1 <- read.fwf("dist.dat", width=c(4, 22, rep(7, 8)))
> . . .
Actually I am reading an output file of a program that I do not have.
I am using R 0.64.2 under Windows 95. I soon found out that read.fwf()
requires Perl, which I did not have installed. So I downloaded ActivePerl
from http://www.activestate.com/ActivePerl/ and installed it, as well as
DCOM for Windows 95 (required for Windows 95 machines only) - downloadable
from http://www.microsoft.com/com/dcom/dcom95/dcom1_3.asp.
The install was straightforward (I put DCOM on first, which seemed
logical). However I still have trouble with read.fwf(). At first I thought
that it was due to spaces in my directory names, but it persisted after I
fixed this up. My complete session follows:
[Previously saved workspace restored]
> t1 <- read.fwf("d:/maj/consulting/Mark Stevens/matrix.txt", width=c(4,
22, rep(7, 8)))
Error: "scan" can't open file
> t1 <- read.fwf("d:/maj/consulting/MarkStevens/matrix.txt", width=c(4, 22,
rep(7, 8)))
Error: "scan" can't open file
> ss <- scan("d:/maj/consulting/MarkStevens/matrix.txt")
Error: "scan" expected a real got "AWANUI"
>
> t1 <- read.fwf("d:/maj/consulting/MarkStevens/matrix.txt", width=c(4, 22,
rep(7, 8)))
Error: "scan" can't open file
> t1 <- read.fwf("d:\maj\consulting\MarkStevens\matrix.txt", width=c(4, 22,
rep(7, 8)))
Error: "scan" can't open file
>
> t1 <- read.fwf("d:/maj/Consulting/MarkStevens/matrix.txt", width=c(4, 22,
rep(7, 8)))
Error: "scan" can't open file
> t1 <- read.fwf("D:/maj/Consulting/MarkStevens/matrix.txt", width=c(4, 22,
rep(7, 8)))
Error: "scan" can't open file
> t1 <- read.fwf("d:\\maj\\Consulting\\MarkStevens\\matrix.txt", width=c(4,
22, rep(7, 8)))
Error: "scan" can't open file
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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