- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个 RStudio Shiny 服务器正在运行,我从 https://github.com/rstudio/ggvis 安装了 ggvis但我无法在服务器中重现任何演示示例。
当我在服务器(3.1.0)中安装相同版本的情况下运行 R 时,我可以执行以下操作:
> library("shiny")
> library("ggvis")
The ggvis API is currently rapidly evolving. We strongly recommend that you do not rely on this for production, but feel free to explore. If you encounter a clear bug, please file a minimal reproducible example at https://github.com/rstudio/ggvis/issues. For questions and other discussion, please use https://groups.google.com/group/ggvis.
Attaching package: "ggvis"
The following object is masked from "package:stats":
filter
> ggvis::ggvisOutput
function (plot_id = rand_id("plot_id"))
{
ggvisOutputElements(plot_id, spec = NULL, shiny = TRUE)
}
<environment: namespace:ggvis>
# ui.R
shinyUI(pageWithSidebar(
div(),
sidebarPanel(
sliderInput("n", "Number of points", min = 1, max = nrow(mtcars),
value = 10, step = 1),
uiOutput("plot_ui")
),
mainPanel(
ggvisOutput("plot"),
tableOutput("mtc_table")
)
))
# server.R
library("ggvis", lib.loc="/opt/R/R-3.1.0/lib64/R/library")))
shinyServer(function(input, output, session) {
# A reactive subset of mtcars
mtc <- reactive({ mtcars[1:input$n, ] })
# A simple visualisation. In shiny apps, need to register observers
# and tell shiny where to put the controls
mtc %>%
ggvis(~wt, ~mpg) %>%
layer_points() %>%
bind_shiny("plot", "plot_ui")
output$mtc_table <- renderTable({
mtc()[, c("wt", "mpg")]
})
})
ERROR: could not find function "ggvisOutput"
ggvisOutput
注释掉该行语句然后正常呈现页面但没有绘图。
最佳答案
来源 ggvis
在您的 ui.R
文件(此处的示例 http://128.199.255.233:3838/userApps/john/ggvistest/
):
用户界面
library("ggvis")
shinyUI(pageWithSidebar(
div(),
sidebarPanel(
sliderInput("n", "Number of points", min = 1, max = nrow(mtcars),
value = 10, step = 1),
uiOutput("plot_ui")
),
mainPanel(
ggvisOutput("plot"),
tableOutput("mtc_table")
)
))
library(shiny)
library(ggvis)
shinyServer(function(input, output, session) {
# A reactive subset of mtcars
mtc <- reactive({ mtcars[1:input$n, ] })
# A simple visualisation. In shiny apps, need to register observers
# and tell shiny where to put the controls
mtc %>%
ggvis(~wt, ~mpg) %>%
layer_points() %>%
bind_shiny("plot", "plot_ui")
output$mtc_table <- renderTable({
mtc()[, c("wt", "mpg")]
})
})
关于Rstudio Shiny 无法使用 ggvis,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24935452/
在使用 rstudio 中的“查找/替换”功能进行搜索时,如何(如果可能)在我的 Rscript 中计算搜索的总出现次数? 例如,假设我有以下脚本: a <- c(1,2,3) print(a) pr
我试图确保在保存文件时,Shiny 中 RStudio 中的代码折叠(通过 Alt+L)保持原位。目前,每次保存文件时,折叠都会消失。有人知道如何使折叠永久且独立于保存文件吗? 供引用:我在 Wind
我是一个非常注重视觉的人,希望区分#我注释掉的命令和##给我自己或同事的文件消息。我查看了 RStudio 是否支持不同类型的注释,但似乎不支持。有谁知道解决这个问题的方法吗? 谢谢! 最佳答案 你可
我正在使用 RStudio,并一直在尝试使用 rPython 包来为我处理一些电子邮件。这涉及到解压一些电子邮件附件,因此我需要使用比 2.7 更新的 Python 版本。 我在 ubuntu 上,所
我刚读了Google's R Style Guide , 并决定与函数名和变量中的字母大小写一致。如何在 RStudio 的编辑器中更改字母大小写?具体来说,如何换词 全部小写 全部大写 大写的大小写
有没有办法禁用 RStudio 中的所有断点?我查看了 RStudio 文档并进行了谷歌搜索,但找不到方法。 最佳答案 我也很好奇,特别想对断点有个大概的了解。 我跑了grep在我的项目文件夹中,这就
是否可以在 Rstudio 中更改背景颜色?我知道可以更改编辑器的主题,这是一个非常好的功能并且我已经在使用,但是是否可以更改其他窗口(环境、历史、文件等)的背景颜色... ) 到白色以外的其他东西,
我正在 RStudio 中开发一个包,并想使用断点来调试我的函数。但是,我一直遇到同样的问题:我设置了一个断点,RStudio 警告我必须构建并重新加载包才能激活断点(即使我刚刚构建并重新加载了包),
登录Desktop Rstudio后,会出现以下消息: Error in yaml.load(readLines(con), error.label = error.label, ...) : o
我已经开始学习 - Windows 操作系统上的机器学习类(class)。每当我启动 Spyder 3.2.4(Python 3.6) & RStudio(1.1.383) 的新实例时,每次我都需要在
我看了Fira Code我想使用列出的受支持编辑器之一进行尝试。所以我启动了 RStudio(Win 盒上的 0.99.491 版)并将字体设置为 Fira Code 但......没有。那么如何在
在 linux 中,我经常用鼠标突出显示文本进行复制,然后在其他地方单击鼠标中键进行粘贴。在 RStudio 中,这不起作用,强制使用 Ctrl+C 和 Ctrl+V 或右键单击菜单。我经常想在控制台
有没有办法改变 help 中显示的文本的字体大小? Rstudio 的选项卡? 我知道可以在所有面板中更改字体大小 Tools > Global > Options > Appearance ,但它不
我下载了最新版本的 Rstudio 以便能够自定义主题。 我按照这个教程安装了 Pandas 主题: https://towardsdatascience.com/customize-your-rst
我使用的是 RStudio 版本 1.1.456,它运行的是 R 版本 3.5.1。我在 64 位 Windows 7 Enterprise 上运行。 我刚开始使用 R Markdown,所以当我在
我一直使用 VScode 作为记笔记的主要 Markdown 平台,并且我已经习惯了实时预览功能。 现在我必须使用 Rmarkdown 生成可更新的报告,我想知道是否有人知道如何使用 Rstudio
我戴老花眼镜,可以阅读所有其他 Pane ,但经常不得不打开 R 寻求帮助,因为它的字体较大,虽然我觉得不方便。 我在 support.rstudio.com 中没有找到任何答案;其他人在 2014
实际上我需要使用 https 运行 rstudio 服务器。 默认为http://server-ip:8787 我正在关注这个文件-(ssl-配置) https://s3.amazonaws.com/
Anaconda 4.3.1 中包含的 Rstudio 安装在我的视网膜屏幕 macbook 上以低分辨率显示。 其他 anaconda 应用程序,以及独立版本的 Rstudio 看起来都不错。 关于
在我的代码完成执行后,我不断地在 RStudio 的编辑窗口中输入,当时我的目的是在控制台窗口中提供一些输入。是否有可以执行的 R 代码可以自动将焦点移动到 RStudio 的控制台窗口? 最佳答案
我是一名优秀的程序员,十分优秀!