progress               package:svMisc               R Documentation

_D_i_s_p_l_a_y _p_r_o_g_r_e_s_s_i_o_n _o_f _a _l_o_n_g _c_a_l_c_u_l_a_t_i_o_n _o_n _t_h_e _c_o_n_s_o_l_e

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

     Display progression level of a long-running task in the console.
     Two mode can be used: either percent of achievement (55%), or the
     number of items or steps done on a total (1 file on 10 done...).

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

     progress(value, max.value = NULL)

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

   value: ~~Describe 'value' here~~ 

max.value: ~~Describe 'max.value' here~~ 

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

     The function uses backspace (\8) to erase characters at the
     console.

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

     This function returns NULL invisibly. It is invoked for its side
     effects.

_N_o_t_e:

     In a GUI, it is preferable to use a non modal dialog box with a
     progress widget, or to display such a progress widget in the
     status bar of your main window. See package 'tk2' for further
     information.

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

     Philippe Grosjean <phgrosjean@sciviews.org>

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

             # 1) A simple progress indicator in %
             cat("\nSimple progress indicator in %:\n")
             for (i in 1:101) {
                     progress(i)
                     Sys.sleep(0.05)
             }
             cat("Done!\n")

             # 2) A progress indicator with 'x on y'
             cat("\nA variation...\n")
             for (i in 1:31) {
                     progress(i, 30)
                     Sys.sleep(0.2)
             }
             cat("Done!\n")

