isCurrent: Use version information to test whether class is current

Description Usage Arguments Value Author(s) See Also Examples

Description

This generic function uses Versioned-class information to ask whether an instance of a class (e.g., read from disk) has current version information.

By default, isCurrent has the following behaviors:

isCurrent(Versioned-instance)

Returns a vector of logicals, indicating whether each version matches the current version from the class prototype.

isCurrent(ANY)

Return NA, indicating that the version cannot be determined

isCurrent(Versioned-instance, "class")

Returns a logical vector indicating whether version identifiers shared between Versioned-instance and "class" are current.

Starting with R-2.6 / Bioconductor 2.1 / Biobase 1.15.1, isCurrent(Versioned-instance, ...) returns an element S4 indicating whether the class has the ‘S4’ bit set; a value of FALSE indicates that the object needs to be recreated.

Usage

1
isCurrent(object, value)

Arguments

object

Object whose version is to be determined, as described above.

value

(Optional) character string identifying a class with which to compare versions.

Value

isCurrent returns a logical vector.

Author(s)

Biocore team

See Also

Versions-class

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
obj <- new("VersionedBiobase")
isCurrent(obj)

isCurrent(1:10) # NA

A <- setClass("A", contains="VersionedBiobase",
         prototype=prototype(new("VersionedBiobase", versions=c(A="1.0.0"))))

a <- A()
classVersion(a)

isCurrent(a, "VersionedBiobase") # is the 'VersionedBiobase' portion current?
classVersion(a)["A"] <- "1.0.1"
classVersion(a)
isCurrent(a, "VersionedBiobase")
isCurrent(a) # more recent, so does not match 'current' defined by prototype

removeClass("A")

turaganitesh/testbiocpackage1234 documentation built on July 4, 2020, 12:57 a.m.