File: handler_filesize.Rd

package info (click to toggle)
r-cran-progressr 0.15.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,132 kB
  • sloc: sh: 13; makefile: 7
file content (47 lines) | stat: -rw-r--r-- 1,587 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/handler_filesize.R
\name{handler_filesize}
\alias{handler_filesize}
\title{Progression Handler: Progress Reported as the Size of a File on the File System}
\usage{
handler_filesize(
  file = "default.progress",
  intrusiveness = getOption("progressr.intrusiveness.file", 5),
  target = "file",
  enable = getOption("progressr.enable", TRUE),
  ...
)
}
\arguments{
\item{file}{(character) A filename.}

\item{intrusiveness}{(numeric) A non-negative scalar on how intrusive
(disruptive) the reporter to the user.}

\item{target}{(character vector) Specifies where progression updates are
rendered.}

\item{enable}{(logical) If FALSE, then progress is not reported.}

\item{\ldots}{Additional arguments passed to \code{\link[=make_progression_handler]{make_progression_handler()}}.}
}
\description{
Progression Handler: Progress Reported as the Size of a File on the File System
}
\details{
This progression handler reports progress by updating the size of a file
on the file system. This provides a convenient way for an R script running
in batch mode to report on the progress such that the user can peek at the
file size (by default in 0-100 bytes) to assess the amount of the progress
made, e.g. \verb{ls -l -- *.progress}.
If the \file{*.progress} file is accessible via for instance SSH, SFTP,
FTPS, HTTPS, etc., then progress can be assessed from a remote location.
}
\examples{
\donttest{\dontrun{
handlers(handler_filesize(file = "myscript.progress"))
with_progress(y <- slow_sum(1:100))
print(y)
}}

}