new_struct {struct} | R Documentation

## Generate a struct object from a Class

### Description

This function creates a newly allocated object from the class identified by the first argument. It works almost identically to `new` but is specific to objects from the struct package and ensures that `entity` slots have their values assigned correctly. This function is usually called by class constructors and not used directly.

### Usage

    new_struct(class, ...)

### Arguments

`class` | The class of struct object to create
`...` | named slots and values to assign

### Value

An object derived from struct_class

### Examples

    S = new_struct('struct_class')

[Package struct version 1.2.0 Index]