progress: Add a progress bar.

Description Usage Arguments Examples

View source: R/progress.R

Description

Add a progress bar.

Usage

1
progress(type = c("down", "up"), con = stdout())

Arguments

type

Type of progress to display: either number of bytes uploaded or downloaded.

con

Connection to send output too. Usually stdout() or stderr.

Examples

1
2
3
4
5
6
7
cap_speed <- config(max_recv_speed_large = 10000)


# If file size is known, you get a progress bar:
x <- GET("http://httpbin.org/bytes/102400", progress(), cap_speed)
# Otherwise you get the number of bytes downloaded:
x <- GET("http://httpbin.org/stream-bytes/102400", progress(), cap_speed)

httr documentation built on Aug. 20, 2017, 5:06 p.m.