如何在RStudio窗口模式下设置闪亮的应用程序大小?

如何在RStudio窗口模式下设置闪亮的应用程序大小?,r,shiny,R,Shiny,我想知道,是否有办法在窗口模式下以预先指定的窗口大小在RStudio中启动shinyapp。我通过使用以下代码创建新文件找到了解决方法: {library(shiny) vwr = dialogViewer('modellvergleiche-irt-with-brms', width = 1600, height = 1200) runGadget(shinyAppDir(appDir = '../modellvergleiche-irt-with-brms'), viewer = vwr)

我想知道,是否有办法在窗口模式下以预先指定的窗口大小在RStudio中启动shinyapp。我通过使用以下代码创建新文件找到了解决方法:

{library(shiny)
vwr = dialogViewer('modellvergleiche-irt-with-brms', width = 1600, height = 1200)
runGadget(shinyAppDir(appDir = '../modellvergleiche-irt-with-brms'), viewer = vwr)
} # Run app in presized window
但我发现它过于丑陋(尤其是appDir='../modellvergleiche irt with brms'部分)。 有没有更好的方法来实现这一点?也许我还没有找到RStudio中的内置设置


我不知道这里有什么难看的。为什么你说“一个新文件”?我必须在我的app.R之外创建一个新文件,否则我就不能再通过RStudio中的runapp按钮启动程序了。此外,我走出文件夹,用appDir='../modellvergleiche irt with brms'重新输入它,这样我就可以将runapp.R与app.R放在同一个文件夹中。最后:我不能使用dialogViewer窗口中的“重新加载”按钮。我看不出这里有什么不好的地方。为什么你说“一个新文件”?我必须在我的app.R之外创建一个新文件,否则我就不能再通过RStudio中的runapp按钮启动程序了。此外,我走出文件夹,用appDir='../modelllvergleiche irt with brms'重新输入它,这样我就可以将runapp.R与app.R放在同一文件夹中。最后:我不能使用dialogViewer窗口中的“重新加载”按钮。