当前位置:网站首页>RNote108---Display the running progress of the R program
RNote108---Display the running progress of the R program
2022-08-05 07:04:00 【51CTO】
I was looking for a displayshinyThe method of the program running progress,However, I only see the progress of the loop execution~Whatever,记录下吧
一、tcltk包
案例:

参数说明:
函数 | 说明 |
tkProgressBar | Displays widgets with labels and progress bars |
setTkProgessBar | Used to update values and labels |
具体参数设置 | |
title, label | 字符串,The title and label of the dialog window are given respectively |
min, max | 数值型,进度条的范围 |
initial, value | The initial value of the progress bar |
width | Pixels of the progress bar |
pb, con | tkProgressBar 的对象 |
二、progress包
A progress bar can be configured,显示百分比、经过时间、Estimated completion time.
案例:
默认参数

Estimated completion time
显示下载百分比,and the remaining time to complete


Calculate the execution time

参数说明:
A function to create a progress bar
函数 | 说明 |
progress_bar$new() | 创建进度条 |
参数设置 | |
format | Can be formatted as a progress bar,默认是百分比"[:bar] :percent".The progress bar is in parentheses on the left,Percentages are printed on the right |
total | total progress,默认100 |
width | 进度条宽度,The default is the width of the current terminal page-2 |
stream | The output method of the progress bar,默认stderr(),但是在Rstudio下有bug,Standard output is used in this casestdout .If not in terminal eitherRstudio中输出,Then no progress bar is printed |
complete | 完成的标识,默认为"=" |
incomplete | Unfinished logo,默认为"-" |
callback | 进度条结束时,调用回调函数. The progress bar object itself is passed as a single parameter to the callback function |
clear | 进度条结束时,是否清除.默认清除 |
show_after | A progress bar is displayed on the screen after a few seconds,For very short processes,Probably not worth showing at all.默认1/10秒 |
force | Whether to force the progress bar to be displayed,即使给定的(或默认的)Streams don't seem to support it |
Functions that use progress bars
There are two functions that update the progress bar:
progress_bar$tick() 按照1or other specified number to increase the progress of the progress bar
progress_bar$update 按照比例
The progress bar is in the first onetick命令后显示,This may not be desirable for long computations,Because nothing is displayed before the first run.Set at the time of calculation or downloadtick(0)A progress bar can be displayed instantly.
函数 | 说明 |
:bar | The progress bar itself |
:current | 当前进度数 |
:total | 总进度数 |
:elapsed | Elapsed time in seconds |
:eta | Estimated completion time |
:percent | 完成百分比 |
:rate | 下载速率,每秒字节数 |
:bytes | 显示字节.If you don't know the file size in advance,Can be useful for downloading or file reading |
:spin | Displays a spinner,even if the process is there0will also be updated |
REF
Package文档即可
边栏推荐
- 今天虚竹哥又发现了一款好用的国产化API工具
- 技术分析模式(九)三重顶部和底部
- AI + video technology helps to ensure campus security, how to build a campus intelligent security platform?
- 淘宝客APP带自营商城本地生活CPS外卖优惠电影票话费更新渠道跟单生活特权V3
- 日本卫生设备行业协会:日本温水喷淋马桶座出货量达1亿套
- typescript59-泛型工具类型(partial )
- typescript67-索引查询类型
- 性能提升400倍丨外汇掉期估值计算优化案例
- typescript62-泛型工具类型(record)
- 武田公司2022财年第一季度业绩强劲;正稳步实现全年的管理层指引目标
猜你喜欢

FPGA parsing B code----serial 4

2022最强版应届生软件测试面试攻略

如何将.asd恢复为Word文档

性能提升400倍丨外汇掉期估值计算优化案例

Japan Sanitary Equipment Industry Association: Japan's warm water shower toilet seat shipments reached 100 million sets

lingo入门——河北省第三届研究生建模竞赛B题

Jenkins详细配置

(四)旋转物体检测数据roLabelImg转DOTA格式

After docker is deployed, mysql cannot connect

Nacos cluster construction
随机推荐
(四)旋转物体检测数据roLabelImg转DOTA格式
MySQL:连接查询 | 内连接,外连接
typescript60-泛型工具类型(readonly)
淘宝客APP带自营商城本地生活CPS外卖优惠电影票话费更新渠道跟单生活特权V3
技术分析模式(八)双顶和底
DNSlog外带数据注入
利用将网页项目部署到阿里云上(ngnix)
2022最强版应届生软件测试面试攻略
工作3年,回想刚入门和现在的今昔对比,笑谈一下自己的测试生涯
Matplotlib plotting notes
MyCat配置文件
技术分析模式(十一)如何交易头肩形态
IO进程线程->进程间的通信->day7
MySQL: JDBC programming
LaTeX Notes
MySQL表操作练习
protobuf根据有关联的.proto文件进行编译
Jenkins详细配置
typescript63-索引签名类型
Tips for formatting code indentation