repr: The "official" string representation of an object.

View source: R/oop_s3.R

reprR Documentation

The "official" string representation of an object.

Description

The "official" string representation of an object. If at all possible, this should look like a valid R expression that could be used to recreate an object wit the same value (given an appropriate environment). This description is copied from the python documentation.

Usage

repr(x, ...)

Arguments

x

Object.

...

Additional arguments needed for computing the string.

Value

A string.

Examples

EMAIL <- new_class(class_name = "EMAIL")
email <- EMAIL$instantiate
register_method(EMAIL, ..init.. = function(address) self$address = address)

patrick <- email('patrick@test.com')
repr(patrick)


bandicoot documentation built on May 29, 2024, 8:01 a.m.