struct {matter} | R Documentation

## C-Style Structs Stored in Virtual Memory

### Description

This is a convenience function for creating and reading C-style structs in a single file stored in virtual memory.

### Usage

    struct(..., filename = NULL, filemode = "rw", offset = 0)

### Arguments

`...` | Named integers giving the members of the `struct`. They should be of the form `name=c(type=length)`.
`filename` | A single string giving the name of the file.
`filemode` | The mode to use to open the file.
`offset` | A scalar integer giving the offset from the beginning of the file.

### Details

This is simply a convenient wrapper around the wrapper around `matter_list` that allows easy specification of C-style structs in a file.

### Value

A object of class `matter_list`.

### Author(s)

Kylie A. Bemis

### See Also

`matter_list`

### Examples

    x <- struct(first=c(int=1), second=c(double=1))

    x$first <- 2L
    x$second <- 3.33

    x$first
    x$second

[Package matter version 1.16.0 Index]