ensureClassRegistration-character-method: Ensure Class Registration

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

Description

See generic: ensureClassRegistration

Usage

1
2
## S4 method for signature 'character'
ensureClassRegistration(cl, strict = FALSE, ...)

Arguments

cl

character.

strict

logical. TRUE: error if cl is already a class (checked by isClass); FALSE: if class already exists it is not reset.

...

Further arguments passed to subsequent functions/methods. In particular: setOldClass

Value

logical. TRUE.

Author(s)

Janko Thyson janko.thyson@rappster.de

References

http://github.com/rappster/classr

See Also

ensureClassRegistration

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 

## NOTE //
## Keeping the default for 'where'  that is used by 'setOldClass',
## i.e. simply *not* providing a value in the call to 'ensureClassRegistration',
## only works as long as your package has not been fully loaded yet
ensureClassRegistration(cl = "TestClass")
isClass("TestClass")
ensureClassRegistration(cl = "TestClass")
try(ensureClassRegistration(cl = "TestClass", strict = TRUE))
ensureClassRegistration(cl = c("TestClass1", "TestClass2"))
isClass("TestClass1")
isClass("TestClass2")


## End(Not run)

rappster/classr documentation built on May 26, 2019, 11:11 p.m.