writeDataXML             package:Rggobi             R Documentation

_W_r_i_t_e _o_n_e _o_r _m_o_r_e _d_a_t_a_s_e_t_s _i_n _G_G_o_b_i'_s _X_M_L _f_o_r_m_a_t

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

     This creates an XML output object (to a buffer, DOM, ...)
     containing a description of a collection of datasets using GGobi's
     data format.

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

     writeDataXML(..., dom = xmlOutputDOM("ggobidata", attrs = c(count = length(args))))

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

     ...: one or more datasets, typically given as 'name=object' so
          that the `name' is used in the XML description. 

     dom: the XML output object to which to write/append the XML
          description. This is usuall an object of class
          'XMLOutputStream'

_D_e_t_a_i_l_s:

     The GGobi data format is described in the GGobi documentation and
     may be used in other projects and contexts. It is reasonably
     simply, consisting of a top-level 'ggobidata' node with an
     (optional) attribute indicating the number of datasets it
     contains, and then each dataset described as sub-nodes. Each
     dataset consists of a top-level 'data' node with 'name' attribute.
     Within this, we have an optional 'description' node giving a
     human-readable description of the dataset, where it came from,
     etc. Next is a 'variables' node which details each of the
     variables, giving its type (currently either as a 'realvariable'
     or 'categoricalvariable') and any other information, such as its
     name and its levels.

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

     The 'dom' object is returned, presumably with its state changed to
     include the XML for the datasets.

_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:

     'addXMLDataset'

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

      data(mtcars)
      dd <- writeDataXML(mtcars = mtcars)
      print(dd$value())

