W/R .bin in R

tData = as.integer(2^(1:18))

# make sure what you are writing is the same format (e.g. integer) as reading.

pFileWrite = file('test_data/test.bin', 'wb')

writeBin(tData, pFileWrite, size=4, endian='little')

close(pFileWrite)

pFileRead = file('test_data/tes......