Reading/Writing to Memory-Mapped File, mmap Package

I am not too familiar with the concept of memory-mapped files, but I have a device that I would like to communicate with, directly from R, that uses them. I have been reading through several examples of the mmap package to find a basic example of reading a file.

I see many examples of how to write to a file, but how do you read a memory-mapped file?


Hello and welcome to the RStudio Community Forum.

There is a vignette (long-form of documentation) for the mmap package. You can access it by running:


Then click on the PDF link that pops up. There are good examples therein.
The package provides 'disk-to-memory' and 'memory-to-disk' mapping which is hopefully what you need.


1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.