[R] File Reading Problem

Duncan Murdoch dmurdoch at pair.com
Mon Sep 1 22:32:26 CEST 2003

On Mon, 1 Sep 2003 14:26:43 -0700, "Jiming Yu"
<jimingyu at princeton.edu> wrote:

>Dear all,
>    I am trying to read characters byte by byte(in their ASCII codes) from a

I was going to suggest using readBin, but there seems to be a bug:

> con <- file('c:/test.txt','rb')
> readBin(con,'c',15,1)
stack imbalance in internal readBin, 9 then 8stack imbalance in
.Internal, 8 then 7
stack imbalance in {, 6 then 5
Error: unprotect(): stack imbalance

This was in today's r-devel build for Windows, but the bug also shows
up in 1.7.1.  I'll look into it.

Duncan Murdoch

More information about the R-help mailing list