Learn R Programming

BBmisc (version 1.10)

makeS3Obj: Simple constructor for S3 objects based on lists.

Description

Simple wrapper for as.list and setClasses.

Usage

makeS3Obj(classes, ...)

Arguments

classes
[character] Class(es) for constructed object.
...
[any] Key-value pairs for class members.

Value

Object.

Examples

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

Run the code above in your browser using DataLab