我正在设计一个应用程序,我有一个withProgress()通知,它在整个过程中都被大量使用.我设置了酒吧的位置,例如:
tags$style(
paste0(
".shiny-progress-notification{",
" position:fixed !important;",
" top: calc(0.5%) !important;",
" left: calc(9%) !important;",
" font-size: 15px !important;",
" font-style: bold !important;",
" width: 500px !important;",
"}"
)
)
Run Code Online (Sandbox Code Playgroud)
这样做的问题在于它根据用户的显示器显示在不同的位置,以及它们放大了多少等等.
是否可以将加载对象放在流体对象或类似的东西中,以便它以更结构化的方式适合页面,我不必显式定义坐标或使用calc()?
具体来说,我想将加载栏放在fluidRow()页面顶部的一个位置,这样就是mainPanel()其他所有内容的一部分.我知道这个问题有点宽泛但我对所有流体对象保持加载条的任何答案持开放态度.
原始html看起来像:
<!DOCTYPE html>
<html class = "shiny busy">
<head>...</head>
<body>
<div class="container-fluid">...</div>
<div id="shiny-notification-panel">
<div id="shiny-notification-f2530c977659e1a3" class="shiny-notification">
<div class="shiny-notification-close">×</div>
<div class="shiny-notification-content">
<div class="shiny-notification-content-text">
<div id="shiny-progress-f2530c977659e1a3" class="shiny-progress-notification">
<div class="progress progress-striped active" style="">
<div class="progress-bar" style="width: 30%;"></div>
</div>
<div class="progress-text">
<span class="progress-message">Instantiating Data</span>
<span class="progress-detail"></span> …Run Code Online (Sandbox Code Playgroud) 在某些函数的帮助文件中,默认值有时以向量的形式给出。一个例子是:
?base::rank
这将打开一个帮助文件,其中显示了用法。
用法:
rank(x, na.last = TRUE,
ties.method = c("average", "first", "last", "random", "max", "min"))
Run Code Online (Sandbox Code Playgroud)
在此示例中,默认na.last值为TRUE。但是,默认值ties.method是作为向量给出的。就默认情况下选择哪个而言,这究竟意味着什么?而且,更重要的是,为什么它首先是这样写的?
谢谢
有时,由于我无法确定的原因,ess-indent-or-complete会将输入发送到R控制台。换句话说,我将输入一些内容,点击选项卡以自动完成(或company对我来说自动完成),并且该R过程将用换行符更新(.R左侧“缓冲区”的文件,R右侧的过程):
x <- mea\xe2\x96\x88 | >\n |\n |\nRun Code Online (Sandbox Code Playgroud)\n...然后我点击 Tab 来完成“ mean”:
x <- mean\xe2\x96\x88 | >\n | > ## note the new line here\n |\nRun Code Online (Sandbox Code Playgroud)\n这可能真的很烦人,至少有两个原因:
\nbrowser(),它会提前行,这通常是不可取的。我自己尝试诊断此问题,但无济于事。每次重新启动 emacs 都会修复它,但它似乎全天随机发生。一旦启动,它就不会停止,直到 emacs 重新启动。
\n我正在运行emacs 27.1,ess-20210818.843(尽管这已经存在很长时间了,所以我不相信它是特定于版本的),并且处于ESS[R] mode.
一旦在特定会话中开始发生不需要的行为,M-: (ess-command "")从我的文件缓冲区调用就会复制该行为。.R除此之外我没有任何见解。