title: How to read binary data in .dat file in R? Got errors using readBin
body: <p>I've a large .dat file (30GB), inside it is binary file as I cannot immediately see anything that makes sense when I open it using text editor. I have specific definitions about each column, should be more than 900 columns with 30,000,000 rows. All column names and values are defined as character with differing lengths. Here're the warnings I got when trying readBin function:</p>
  <p>df = readBin(bdata, character(), n = 10)</p>
  <p>Warning messages:
  1: In readBin(bdata, character(), n = 10) :
  null terminator not found: breaking string at 10000 bytes</p>
  <p>df gave me this:</p>
  <p>023756063201056576593012004003012008005000009844000011000000011730000012716000013583000014110000014905000015775000016965000018575000012605000012792000018083000013263000013468000020182000021175000021117000014673000014780000022961000023733000016561000015848000034450000034450000034450000034450000034450000034150000034150000034150000037386000037386000024150000024050000034050000024050000025550000035550000035550000035550000025850000025050000035050000035050000025050000025250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000311000000258000000205000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000                                                                                                                                                                                                                        000004280000004353000004356000004384000004313000004000000004042000003999000004021000003991000003945000003954000003937000003979000003922000003970000003972000003957000003975000003959000004066000003939000003975000004018000004300000004300000004300000004300000004300000004000000004000000004000000004000000004000000004000000004000000004000000004000000004000000004000000004000000004000000004000000004000000004000000004000000004000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000</p>
  <p>...</p>
  <p>which is not what I should see. Please advise. Thanks.</p>