Learn R Programming

BBmisc (version 1.13)

makeS3Obj: Simple constructor for S3 objects based on lists.

Description

Simple wrapper for as.list and setClasses.

Usage

makeS3Obj(classes, ...)

Value

Object.

Arguments

classes

[character]
Class(es) for constructed object.

...

[any]
Key-value pairs for class members.

Examples

Run this code
makeS3Obj("car", speed = 100, color = "red")

Run the code above in your browser using DataLab