R: List all types for a method

listTypes {svMisc} | R Documentation

## List all types for a method

### Description

List all types for a method; types are variants for a given method defined in a way it is easy to add other variants dynamically (on the contrary to a usual `type =` or `which =` argument, like in `plot.ts()` or `plot.lm()`, respectively.

### Usage

    listTypes(method, class = "default", strict = FALSE)

### Arguments

`method` | the method name.
`class` | the class name.
`strict` | do we list only types for the class (`TRUE`), or all possible types, including for inherited objects, and default ones (`FALSE`, by default)?

### Value

A vector with character strings with methods' type names.

### Note

This function is only useful for special generic functions with type argument like `view`, `copy` or `export`. These functions offer a mechanism to easily add custom types, and the present function list them. For S3 objects a type is simply a function whose name is : <method>_<type>.<class>. So, adding new <type>s for <method> is very easy to implement.

### Author(s)

Philippe Grosjean <phgrosjean@sciviews.org>

### See Also

`listMethods`

### Examples

    listTypes("view")  # All default view types currently defined
    listTypes("view", "data.frame")
    listTypes("view", "data.frame", TRUE) # None, except if you defined custom views!

[Package svMisc version 0.9-70 Index]