home *** CD-ROM | disk | FTP | other *** search
-
- _A_c_t_u_a_l _A_r_g_u_m_e_n_t_s
-
- substitute(arg, env=NULL)
-
- _D_e_s_c_r_i_p_t_i_o_n:
-
- substitute returns the expression which was typed as
- the value of a formal argument. The typical use of
- this is to create informative labels for data sets and
- plots. The following example shows a simple use of
- this facility. It uses the functions deparse and sub-
- stitute to create labels for a plot which are character
- string versions of the actual arguments to the function
- myplot.
-
- _E_x_a_m_p_l_e_s:
-
- myplot <- function(x, y)
- plot(x, y, xlab=deparse(substitute(x)),
- ylab=deparse(substitute(y)))
-
-