sinkplot               package:gplots               R Documentation

_S_e_n_d _t_e_x_t_u_a_l _R _o_u_t_p_u_t _t_o _a _g_r_a_p_h_i_c_s _d_e_v_i_c_e

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

     Divert R's standard text output to a graphics device.

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

     sinkplot(operation = c("start", "plot", "cancel"), ...)

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

operation: See below

     ...: Plot arguments. (Ignored unless 'operation'="plot").

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

     This function allows the printed output of R commands to be
     captured and displayed on a graphics device.

     The capture process is started by calling 'sinkplot("start")'. Now
     R commands can be executed and all printed output (except errors)
     will be captured.  When the desired text has been captured
     'sinkplot("plot")' can be called to actually display the output. 
     'sinkplot("cancel")' can be used to abort the output capture
     without plotting.

     The current implementation does not allow 'sinkplot' to be nested.

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

     Invisibly returns a character vector containing one element for
     each line of the captured output.

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

     Gregory R. Warnes warnes@bst.rochester.edu

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

     Functionality requested by Kevin Wright kwright@eskimo.com in the
     R-devel newlist posting <URL:
     https://www.stat.math.ethz.ch/pipermail/r-devel/2004-January/028483.html>

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

     'capture.output', 'textplot'

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

     ## Not run: 
        set.seed(12456)
        x <- factor(sample( LETTERS[1:5], 50, replace=TRUE))
        y <- rnorm(50, mean=as.numeric(x), sd=1)

        par(mfrow=c(1,2))
        boxplot(y~x, col="darkgreen")

        sinkplot()
        anova(lm(y~x))
        sinkplot("plot",col="darkgreen")
     ## End(Not run)

