Package knitrprogressbar

Similar documents
Package cattonum. R topics documented: May 2, Type Package Version Title Encode Categorical Features

Package fastdummies. January 8, 2018

Package messaging. May 27, 2018

Package sessioninfo. June 21, 2017

Package tibble. August 22, 2017

Package rprojroot. January 3, Title Finding Files in Project Subdirectories Version 1.3-2

Package validara. October 19, 2017

Package docxtools. July 6, 2018

Package facerec. May 14, 2018

Package canvasxpress

Package githubinstall

Package ECctmc. May 1, 2018

Package tidyselect. October 11, 2018

Package robotstxt. November 12, 2017

Package SEMrushR. November 3, 2018

Package spark. July 21, 2017

Package styler. December 11, Title Non-Invasive Pretty Printing of R Code Version 1.0.0

Package dbx. July 5, 2018

Package cli. November 5, 2017

Package goodpractice

Package purrrlyr. R topics documented: May 13, Title Tools at the Intersection of 'purrr' and 'dplyr' Version 0.0.2

Package wrswor. R topics documented: February 2, Type Package

Package rcmdcheck. R topics documented: November 10, 2018

Package semver. January 6, 2017

Package projector. February 27, 2018

Package dkanr. July 12, 2018

Package geojsonsf. R topics documented: January 11, Type Package Title GeoJSON to Simple Feature Converter Version 1.3.

Package readxl. April 18, 2017

Package internetarchive

Package pkgbuild. October 16, 2018

Package fingertipsr. May 25, Type Package Version Title Fingertips Data for Public Health

Package data.world. April 5, 2018

Package calpassapi. August 25, 2018

Package kdtools. April 26, 2018

Package memoise. April 21, 2017

Package wdman. January 23, 2017

Package bisect. April 16, 2018

Package oec. R topics documented: May 11, Type Package

Package opencage. January 16, 2018

Package datasets.load

Package qualmap. R topics documented: September 12, Type Package

Package humanize. R topics documented: April 4, Version Title Create Values for Human Consumption

Package jpmesh. December 4, 2017

Package embed. November 19, 2018

Package WordR. September 7, 2017

Package gtrendsr. October 19, 2017

Package vinereg. August 10, 2018

Package available. November 17, 2017

Package covr. October 18, 2018

Package widyr. August 14, 2017

Package svglite. September 11, 2017

Package guardianapi. February 3, 2019

Package ggimage. R topics documented: November 1, Title Use Image in 'ggplot2' Version 0.0.7

Package rsppfp. November 20, 2018

Package datapasta. January 24, 2018

Package sfdct. August 29, 2017

Package triebeard. August 29, 2016

Package nngeo. September 29, 2018

Package censusr. R topics documented: June 14, Type Package Title Collect Data from the Census API Version 0.0.

Package ezknitr. September 16, 2016

Package profvis. R topics documented:

Package pdfsearch. July 10, 2018

Package tidytree. June 13, 2018

Package ggimage. R topics documented: December 5, Title Use Image in 'ggplot2' Version 0.1.0

Package gifti. February 1, 2018

Package TrafficBDE. March 1, 2018

Package zip. R topics documented: March 11, Title Cross-Platform 'zip' Compression Version 2.0.1

Package farver. November 20, 2018

Package statsdk. September 30, 2017

Package repec. August 31, 2018

Package haven. April 9, 2015

Package textrecipes. December 18, 2018

Package gtrendsr. August 4, 2018

Package librarian. R topics documented:

Package mdftracks. February 6, 2017

Package keyholder. May 19, 2018

Package radix. September 17, 2018

Package TrajDataMining

Package editdata. October 7, 2017

Package barcoder. October 26, 2018

Package BiocManager. November 13, 2018

Package tidylpa. March 28, 2018

Package geogrid. August 19, 2018

Package pwrab. R topics documented: June 6, Type Package Title Power Analysis for AB Testing Version 0.1.0

Package essurvey. August 23, 2018

Package modules. July 22, 2017

Package RODBCext. July 31, 2017

Package spelling. December 18, 2017

Package zeallot. R topics documented: September 28, Type Package

Package effectr. January 17, 2018

Package reticulate. November 24, 2017

Package slickr. March 6, 2018

Package fitbitscraper

Package postgistools

Package pkgload. July 8, 2018

Package cloudml. June 12, 2018

Package comparedf. February 11, 2019

Package clipr. June 23, 2018

Package liftr. R topics documented: May 14, Type Package

Package shinyfeedback

Transcription:

Type Package Title Provides Progress Bars in 'knitr' Version 1.1.0 Package knitrprogressbar February 20, 2018 Provides a progress bar similar to 'dplyr' that can write progress out to a variety of locations, including stdout(), stderr(), or from file(). Useful when using 'knitr' or 'rmarkdown', and you still want to see progress of calculations in the terminal. BugReports https://github.com/rmflight/knitrprogressbar/issues URL https://rmflight.github.io/knitrprogressbar License MIT + file LICENSE Encoding UTF-8 LazyData true Imports R6, R.oo Suggests knitr, rmarkdown, purrr, testthat, covr, mockr, withr, parallel VignetteBuilder knitr RoxygenNote 6.0.1 NeedsCompilation no Author Robert M Flight [aut, cre], Hadley Wickham [ctb] (Author of included dplyr fragments), Romain Francois [ctb] (Author of included dplyr fragments), Lionel Henry [ctb] (Author of included dplyr fragments), Kirill Müller [ctb] (Author of included dplyr fragments), RStudio [cph] (Copyright holder of included dplyr fragments) Maintainer Robert M Flight <rflight79@gmail.com> Repository CRAN Date/Publication 2018-02-20 04:04:54 UTC 1

2 make_kpb_output_decisions R topics documented: make_kpb_output_decisions................................ 2 progress_estimated..................................... 3 set_progress_mp...................................... 4 update_progress....................................... 5 watch_progress_mp..................................... 5 Index 7 make_kpb_output_decisions Progress Output Location Provides functionality to decide how the progress should be written, if at all. make_kpb_output_decisions() Details This function makes decisions about how the progress bar should be displayed based on whether: 1. The code is being run in an interactive session or not 2. The code is part of a knitr evaluation using knit() or rmarkdown::render() 3. Options set by the user. These options include: (a) kpb.suppress_noninteractive: a logical value. Whether to suppress output when being run non-interactively. (b) kpb.use_logfile: logical, should a log-file be used for output? (c) kpb.log_file: character string defining the log-file to use. kpb.use_logfile must be TRUE. (d) kpb.log_pattern: character string providing a pattern to use, will be combined with the chunk label to create a log-file for each knitr chunk. kpb.use_logfile must be TRUE. Based on these, it will either return a newly opened connection, either via stderr(), stdout(), or a file connection via file("logfile.log", open = "w"). Note that for files this will overwrite a previously existing file, and the contents will be lost. a write-able connection or NULL

progress_estimated 3 Examples ## Not run: # suppress output when not interactive options(kpb.suppress_noninteractive = TRUE) # use a log-file, will default to kpb_output.txt options(kpb.use_logfile = TRUE) # use a specific log-file options(kpb.use_logfile = TRUE) options(kpb.log_file = "progress.txt") # use a log-file based on chunk names options(kpb.use_logfile = TRUE) options(kpb.log_pattern = "pb_out_") # for a document with a chunk labeled: "longcalc", this will generate "pb_out_longcalc.log" ## End(Not run) progress_estimated Progress bar with estimated time. This provides a reference class representing a text progress bar that displays the estimated time remaining. When finished, it displays the total duration. The automatic progress bar can be disabled by setting progress_location = NULL. progress_estimated(n, min_time = 0, progress_location = make_kpb_output_decisions()) n Total number of items min_time Progress bar will wait until at least min_time seconds have elapsed before displaying any results. progress_location where to write the progress to. Default is to make decisions based on location type using make_kpb_output_decisions(). A ref class with methods tick(), print(), pause(), and stop().

4 set_progress_mp See Also make_kpb_output_decisions() Examples p <- progress_estimated(3) p$tick() p$tick() p$tick() p <- progress_estimated(3) for (i in 1:3) p$pause(0.1)$tick()$print() p <- progress_estimated(3) p$tick()$print()$ pause(1)$stop() # If min_time is set, progress bar not shown until that many # seconds have elapsed p <- progress_estimated(3, min_time = 3) for (i in 1:3) p$pause(0.1)$tick()$print() ## Not run: p <- progress_estimated(10, min_time = 3) for (i in 1:10) p$pause(0.5)$tick()$print() # output to stderr p <- progress_estimated(10, progress_location = stderr()) # output to a file p <- progress_estimated(10, progress_location = tempfile(fileext = ".log")) ## End(Not run) set_progress_mp multi process progress indicator Sets up a progress object that writes to a shared file to indicate the total progress. Progress can be monitored by watch_progress_mp. set_progress_mp(write_location = NULL) write_location where to save progress to

update_progress 5 ProgressMP See Also watch_progress_mp update_progress updating progress bars Takes care of updating a progress bar and stopping when appropriate update_progress(.pb = NULL).pb the progress bar object the progress bar watch_progress_mp watch progress from multi process sets up a "watcher" function that will report on the progress of a multi-process process that is being indicated by set_progress_mp. watch_progress_mp(n, min_time = 0, watch_location = NULL, progress_location = make_kpb_output_decisions()) n min_time number of times process is running how long to wait watch_location where is the progress being written to progress_location where to write the progress output

6 watch_progress_mp ProgressMPWatcher See Also set_progress_mp

Index make_kpb_output_decisions, 2 make_kpb_output_decisions(), 4 progress_estimated, 3 set_progress_mp, 4 update_progress, 5 watch_progress_mp, 5 7