Versioned package:Biobase R Documentation _C_l_a_s_s "_V_e_r_s_i_o_n_e_d" _D_e_s_c_r_i_p_t_i_o_n: Use this class as a `superclass' for classes requiring infomration about versions. _M_e_t_h_o_d_s: The following are defined; package developers may write additional methods. '_n_e_w("_V_e_r_s_i_o_n_e_d", ..., _v_e_r_s_i_o_n_s=_l_i_s_t())' Create a new 'Versioned-class' instance, perhaps with additional named version elements (the contents of 'versions') added. Named elements of 'versions' are character strings that can be coerced using 'package_version', or 'package_version' instances. '_c_l_a_s_s_V_e_r_s_i_o_n(_o_b_j_e_c_t)' Obtain version inforomation about instance 'object'. See 'classVersion'. '_c_l_a_s_s_V_e_r_s_i_o_n(_o_b_j_e_c_t) <- _v_a_l_u_e' Set version inforomation on instance 'object' to 'value'; useful when 'object' is an instance of a class that contains 'VersionClass'. See 'classVersion'. '_c_l_a_s_s_V_e_r_s_i_o_n(_o_b_j_e_c_t)["_i_d"] <- _v_a_l_u_e' Create or update version inforomation '"id"' on instance 'object' to 'value'; useful when 'object' is an instance of a class that contains 'VersionClass'. See 'classVersion'. '_s_h_o_w(_o_b_j_e_c_t)' Default method returns 'invisible', to avoid printing confusing information when your own class does not have a 'show' method defined. Use 'classVersion(object)' to get or set version information. _A_u_t_h_o_r(_s): Biocore _S_e_e _A_l_s_o: 'Versions-class' _E_x_a_m_p_l_e_s: obj <- new("Versioned", versions=list(A="1.0.0")) obj classVersion(obj) setClass("A", contains="Versioned") classVersion("A") a <- new("A") a # 'show' nothing by default classVersion(a) setClass("B", contains="Versioned", prototype=prototype(new("Versioned",versions=list(B="1.0.0")))) classVersion("B") b <- new("B") classVersion(b) classVersion(b)["B"] <- "1.0.1" classVersion(b) classVersion("B") classVersion("B") < classVersion(b) classVersion(b) == "1.0.1" setClass("C", representation(x="numeric"), contains=("VersionedBiobase"), prototype=prototype(new("VersionedBiobase", versions=c(C="1.0.1")))) setMethod("show", signature(object="C"), function(object) print(object@x)) c <- new("C", x=1:10) c classVersion(c)