listTypes: List all types for a method

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/listTypes.R

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

1
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 <[email protected]>

See Also

listMethods

Examples

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

svMisc documentation built on May 29, 2017, 12:18 p.m.