Last chance! 50% off unlimited learning
Sale ends in
This generic function checks to see whether Versioned-class
information
is present. When the argument to isVersioned
is a character
string, the prototype of the class corresponding to the string is
consulted.
By default, isVersioned
has the following behaviors:
isVersioned(Versioned-instance)
TRUE
when the instance have version information.
isCurrent("class-name")
TRUE
when the named class extends Versioned-class
.
isVersioned(ANY)
FALSE
isVersioned(object)
isVersioned
returns a logical indicating whether version information is present.
Versions-class
obj <- new("VersionedBiobase")
isVersioned(obj)
isVersioned(1:10) # FALSE
A <- setClass("A", contains="VersionedBiobase",
prototype=prototype(new("VersionedBiobase", versions=c(A="1.0.0"))))
a <- A()
isVersioned(a)
removeClass("A")
Run the code above in your browser using DataLab