Displaying 1 result from an estimated 1 matches for "loopconnection".
2005 Aug 22
2
RFC: "loop connections"
...new
raw_read() method. For output connections, I wrote a raw_write() to
append to a raw vector. On input, the mode (text or binary) is
determined by the data type of the input object; on output, I use the
requested output mode (i.e. "w" / "wb"). For example:
> con <- loopConnection("r", "wb")
> a <- c(10,100,1000)
> writeBin(a, con, size=4)
> r
[1] 00 00 20 41 00 00 c8 42 00 00 7a 44
> close(con)
> con <- loopConnection(r)
> readBin(con, "double", n=3, size=4)
[1] 10 100 1000
> close(con)
I think "loo...