Skip to contents

Set/get options for Julia progress bar

Usage

julia_progress(show, width)

Arguments

show

Whether to show the progress bar. You may also pass in a list of "show" and "width".

width

Width of the progress bar. If "auto", adjusts the progress bar width to fit the console.

Value

Previous values for show and width

Examples

# \donttest{

# Show current progress options
julia_progress()
#> $show
#> [1] TRUE
#> 
#> $width
#> [1] 36
#> 

# Set options and save previous options
old_progress_opts <- julia_progress(show = FALSE, width = 100)
julia_progress()
#> $show
#> [1] FALSE
#> 
#> $width
#> [1] 100
#> 

# Restoring progress settings by passing a list of old options
old_progress_opts
#> $show
#> [1] TRUE
#> 
#> $width
#> [1] 36
#> 
julia_progress(old_progress_opts)
identical(julia_progress(), old_progress_opts)
#> [1] TRUE

# Alternatively, reset to default settings using this syntax:
julia_progress(show = TRUE, width = "auto")

# }