[R] Read to the end of a stream (package Rstreams)

Sven Garbade garbade at psy.uni-muenchen.de
Fri Jun 1 15:02:28 CEST 2001


Hi there,

I want to read all data from a binary file (with package Rstreams). I
tried the following function (small piece of code):

readdata <- function (file) {
    # open file
    s <- openstream(file, "read")
	
    # read int values 
    while (s$position <= s$size) {
    readint(s, 1, 2) -> type
    [...]
    }

 return()
}

and got the following error:

> Error in while (s$position <= s$size) { : missing value where logical needed

Is it possible to read data from the start to the finish of a stream?

Thanks,
Sven
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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