isCurrent              package:Biobase              R Documentation

_U_s_e _v_e_r_s_i_o_n _i_n_f_o_r_m_a_t_i_o_n _t_o _t_e_s_t _w_h_e_t_h_e_r _c_l_a_s_s _i_s _c_u_r_r_e_n_t

_D_e_s_c_r_i_p_t_i_o_n:

     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:

     '_i_s_C_u_r_r_e_n_t(_V_e_r_s_i_o_n_e_d-_i_n_s_t_a_n_c_e)' Returns a vector of logicals,
          indicating whether each version matches the current version
          from the class prototype.

     '_i_s_C_u_r_r_e_n_t(_A_N_Y)' Return 'NA', indicating that the version cannot
          be determined

     '_i_s_C_u_r_r_e_n_t(_V_e_r_s_i_o_n_e_d-_i_n_s_t_a_n_c_e, "_c_l_a_s_s")' Returns a logical vector
          indicating whether version identifiers shared between
          'Versioned-instance' and '"class"' are current.

_U_s_a_g_e:

     isCurrent(object, value)

_A_r_g_u_m_e_n_t_s:

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

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

_V_a_l_u_e:

     'isCurrent' returns a logical vector.

_A_u_t_h_o_r(_s):

     Biocore team

_S_e_e _A_l_s_o:

     'Versions-class'

_E_x_a_m_p_l_e_s:

     obj <- new("VersionedBiobase")
     isCurrent(obj)

     isCurrent(1:10) # NA

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

     a <- new("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")

