setVariableValues.ggobi        package:Rggobi        R Documentation

_S_e_t _v_a_r_i_a_b_l_e _i_n_f_o_r_m_a_t_i_o_n _i_n _a _g_g_o_b_i _d_a_t_a_s_e_t.

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

     These functions allow one to set the values  of one or more
     variables within a ggobi dataset.

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

     setVariableValues.ggobi(values, var, rows = 1:length(values), update = TRUE, .data = 1, .gobi=getDefaultGGobi())

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

  values: a numeric vector of values which are to be used as the values
          for the specified variable.

     var: an identifier for the variable whose values are to be
          replaced with those in 'values'. This can be either a name or
          alternatively an integer identifying the variable by index.

    rows: the indices of the rows whose values are to be set. The i-th
          element of values becomes the value of the rows[i] element of
          the specified variable.

  update: whether to update the displays after setting the values.
          Typicaly this is TRUE. However, if one wanted to set values
          for other variables after this, one can delay the update
          operation until all changes are complete.

   .data: the identifier for the dataset in which the variable(s)
          reside.

   .gobi: the ggobi instance.

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

     'setVariableNames.ggobi' returns the previous settings for the
     names of those variables that were modified.

     'setVariableValues.ggobi' returns the previous values for the
     records/observations in the specified variable.

_N_o_t_e:

     'setVariable.ggobi' and 'setVariableValues.ggobi' appear to be
     very similar. That probably means that a) one will disappear and
     b) one is not tested as comprehensively as the other.

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

     'setDataFrame.ggobi' 'names.ggobiDataset' 'getVariable.ggobi'
     'setVariableNames.ggobi'

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

      g <- ggobi(system.file("data", "flea.xml", package="Rggobi"), args="-noinit")
      g$setVariableNames(tars1="New name", aede1="Other name")

        # Set all the values of the tars1 variable to `1'.
      g$setVariableValues(rep(1, 74), rows = 1:74, var = "tars1")

        # Set the first 23 values. 
      g$setVariableValues(rnorm(23), var = "tars1")

