StringSet-class          package:Rlibstree          R Documentation

_T_h_e _O_p_a_q_u_e _S_t_r_i_n_g_S_e_t _r_e_f_e_r_e_n_c_e _c_l_a_s_s

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

     This is a class that represents a reference to a set of strings in
     the libstree library.  The underlying data structure can be
     thought of as a character vector in which the order is not
     meaningful. The set is a collection of strings.  In R, we can 
     compute its length and index its elements via the '[' operator. 
     This is convenient, for example, when sampling from the set. 
     However because the order is  not respected when constructing the
     set from a character vector, one cannot treat this as a regular
     character vector in  R.

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     The preferred way to create a 'StringSet' is via the generic
     'StringSet' function.

_S_l_o_t_s:


     '_r_e_f': Object of class '"externalptr"'.  This is a reference to
          the internal C-level object that represents the string set in
          libstree. This external pointer has a tag value 'StringSet'.

_M_e_t_h_o_d_s:


     _S_u_f_f_i_x_T_r_e_e 'signature(x = "StringSet")': ... 

     [ 'signature(x = "StringSet", i = "numeric")': ... 

     _a_p_p_e_n_d 'signature(x = "StringSet", values = "character")': ... 

     _c_o_e_r_c_e 'signature(from = "StringSet", to = "character")': ... 

     _l_a_p_p_l_y 'signature(X = "StringSet", FUN = "function")': ... 

     _l_e_n_g_t_h 'signature(x = "StringSet")': ... 

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

     Duncan Temple Lang <duncan@wald.ucdavis.edu>

_R_e_f_e_r_e_n_c_e_s:

     <URL: http://www.cl.cam.ac.uk/~cpk25/libstree/>{libstree} <URL:
     http://www.omegahat.org/Rlibstree>

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

     'StringSet'

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

     words = c("stemming", "boing", "springs")
     set = StringSet(words)

     lapply(set, function(x) nchar)

      # Check that we can accept additional arguments
     lapply(set, substring, 1, 2)

