as_class {S7}R Documentation

Standard class specifications

Description

This is used as the interface between S7 and R's other OO systems, allowing you to use S7 classes and methods with base types, informal S3 classes, and formal S4 classes.

Usage

as_class(x, arg = deparse(substitute(x)))

Arguments

x

A class specification. One of the following:

arg

Argument name used when generating errors.

Value

A standardised class: either NULL, an S7 class, an S7 union, as new_S3_class, or a S4 class.

Examples

as_class(class_logical)
as_class(new_S3_class("factor"))

[Package S7 version 0.1.1 Index]