R: Describe A Class Representation

representation {methods} | R Documentation

## Describe A Class Representation

### Description

Constructs a description of a class (without verifying the validity of the description). A convenience function in calls to `setClass`.

### Usage

    representation(...)

### Arguments

`...` | The call to representation takes arguments that are single character strings. Unnamed arguments are classes that a newly defined class extends; named arguments name the explicit slots in the new class, and specify what class each slot should have.

### Details

The `representation` function applies tests for the validity of the arguments. Each must specify the name of a class.

The classes named don't have to exist when `representation` is called, but if they do, then the function will check for any duplicate slot names introduced by each of the inherited classes.

### Value

The value is just the list of arguments, after these have been checked for validity.

### Author(s)

John Chambers

### References

The web page http://www.omegahat.org/RSMethods/index.html is the primary documentation.

The functions in this package emulate the facility for classes and methods described in Programming with Data, (John M. Chambers, Springer, 1998). See this book for further details and examples.

### See Also

`setClass`

### Examples

    ## representation for a new class with a directly define slot "smooth"
    ## which should be a "numeric" object, and extending class "track"
    representation("track", smooth ="numeric")

[Package Contents]