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

About this list Date view Thread view Subject view Author view

From: Sven Garbade (garbade@psy.uni-muenchen.de)
Date: Fri 01 Jun 2001 - 23:02:28 EST


Message-ID: <3B179264.17BC4740@psy.uni-muenchen.de>

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@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view

This archive was generated by hypermail 2b30 : Fri 22 Jun 2001 - 18:58:43 EST