Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201919

Read binary file with R

$
0
0

I am looking for help to read a binary file with R.

I know the file can be successfully imported in Python with the following code (np for numpy):

dt = np.dtype([('var1', np.uint32), ('var2', np.uint16), ('var3', np.int16), 
('var4', np.int16), ('var5', np.int16)])
data = np.fromfile('filename.DAT', dtype=dt)

I, however, don't understand how to use readBin to import this file in R. Any help would be appreciated.


Viewing all articles
Browse latest Browse all 201919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>