Вы не можете прочитать кучу кусков по 256 байт за один вызов. Вы можете прочитать весь файл ...
fname <- "testing.exe"
finfo <- file.info(fname)
toread <- file(fname, "rb")
alldata <- readBin(toread, raw(), n = finfo$size, endian="little")
close(toread)
или вы можете читать циклы за раз
fname <- "testing.exe"
toread <- file(fname, "rb")
repeat {
chunk <- readBin(toread, raw(), n = 256, endian="little")
if (length(chunk)==0) break;
print(chunk);
}
close(toread)