getDatasetReference          package:Rggobi          R Documentation

_G_e_t _a_n _o_b_j_e_c_t _r_e_p_r_e_s_e_n_t_i_n_g _a_n _i_n_t_e_r_n_a_l _g_g_o_b_i _d_a_t_a_s_e_t

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

     It is convenient to be able to refer to and operate on a ggobi
     dataset as if it were a regular S dataset. This generic function
     allows one to get an object that represents a particular dataset
     and for which many of the standard methods used to manipulate data
     frames, etc. are defined.  The object is of class 'ggobiDataset'. 
     One can derive such an object by index or name, or from a
     'ggobiDisplay' or its fuller form 'ggobiDisplayDescription'.

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

     getDatasetReference(which, .gobi=getDefaultGGobi())
     getDatasetReference.ggobi(which, .gobi=getDefaultGGobi(), simplify = TRUE)
     getDatasetReference.numeric(which, .gobi = getDefaultGGobi())
     getDatasetReference.ggobiDataset(which, .gobi = getDefaultGGobi()) 
     getDatasetReference.ggobiDisplay(which, .gobi=getDefaultGGobi())
     getDatasetReference.ggobiDisplayDescription(which, .gobi=getDefaultGGobi())
     getDisplayDataset.ggobi(dpy, .gobi=getDefaultGGobi())

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

   which: an identifier for the particular dataset to be  foused to
          match agains the names of the datasets, or  altend within the
          ggobi instance. This can be a string which  is used to match
          agains the names of the datasets, or  alternatively an
          integer which is used to index into the list of the datasets
          in the ggobi instance.

     dpy: an object of class 'ggobiDisplay' or an integer identifying
          the particular display in the ggobi instance's display list.

     ...: other arguments that allow one to resolve the dataset,
          usually the '.gobi' argument.

   .gobi: the ggobi instance in which to resolve the
          datgetDatasetReference.ggobiDisplay(which)aset. This should
          be an object of class 'ggobi' or an integer identifying the
          instance in the list of all current ggobi instances.

     'simplify'{a logical value indicating whether, if only one dataset
     is returned, to pass it back directly ('TRUE') or leave it as the
     only element within the returned list ('FALSE'). }

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

     The result is an object of class 'ggobiDataset' and its contents
     are meaningless at the S language level. They are used only in
     internal C routines to identify  the dataset.

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

     Duncan Temple Lang

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

     <URL: http://www.ggobi.org>

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

     '[.ggobi' 'getDisplays.ggobi'

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

       g <- ggobi(system.file("datasets", "flea.xml", package="Rggobi"), args="-noinit")
       g$setData(system.file("datasets", "sat.xml", package="Rggobi"))

       g[[1]]
       g[["flea"]]

       g[["SAT scores"]]

        # Get reference by index
       g$getDatasetReference(1)
        # by name
       g$getDatasetReference("flea")

        # get it from a ggobiDisplayDescription object
       d <- g$getDisplays(TRUE)[[1]]
       getDatasetReference(d)

        # get it from a ggobiDisplay object
       d <- g$getDisplays()[[1]]
       getDatasetReference(d)

