home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Educational / R-0.49-MI / R-0.49-I / help / base / substitute < prev    next >
Encoding:
Text File  |  1997-04-23  |  728 b   |  23 lines

  1.     
  2.     _A_c_t_u_a_l _A_r_g_u_m_e_n_t_s
  3.     
  4.          substitute(arg, env=NULL)
  5.     
  6.     _D_e_s_c_r_i_p_t_i_o_n:
  7.     
  8.          substitute returns the expression which was typed as
  9.          the value of a formal argument.  The typical use of
  10.          this is to create informative labels for data sets and
  11.          plots.  The following example shows a simple use of
  12.          this facility.  It uses the functions deparse and sub-
  13.          stitute to create labels for a plot which are character
  14.          string versions of the actual arguments to the function
  15.          myplot.
  16.     
  17.     _E_x_a_m_p_l_e_s:
  18.     
  19.          myplot <- function(x, y)
  20.                  plot(x, y, xlab=deparse(substitute(x)),
  21.                          ylab=deparse(substitute(y)))
  22.     
  23.