R Can';t以闪亮的颜色显示爆炸的箱线图
我最近发现了使用R Can';t以闪亮的颜色显示爆炸的箱线图,r,shiny,boxplot,R,Shiny,Boxplot,我最近发现了使用D3.js模板的包explodingboxplotR(Cf.)。我有一个带有iris数据的虚拟示例来验证它是否有效: library(explodingboxplotR) data(iris) exploding_boxplot( data.frame( rowname = rownames(iris), iris, stringsAsFactors = FALSE ), y = "Sepal.Length"
D3.js
模板的包explodingboxplotR
(Cf.)。我有一个带有iris
数据的虚拟示例来验证它是否有效:
library(explodingboxplotR)
data(iris)
exploding_boxplot(
data.frame(
rowname = rownames(iris),
iris,
stringsAsFactors = FALSE
),
y = "Sepal.Length",
group = "Species",
color = "Species",
label = "Species"
)
现在,我想将它集成到一个非常简单的shinny
服务器中。从?分解图输出:
说明:
Output and render functions for using exploding_boxplot within
Shiny applications and interactive Rmd documents.
用法:
exploding_boxplotOutput(outputId, width = "100%", height = "400px")
renderExploding_boxplot(expr, env = parent.frame(), quoted = FALSE)
论据:
outputId: output variable to read from
width, height: Must be a valid CSS unit (like \code'100%',
\code'400px', \code'auto') or a number, which will be coerced
to a string and have \code'px' appended.
expr: An expression that generates a exploding_boxplot
env: The environment in which to evaluate \codeexpr.
quoted: Is \codeexpr a quoted expression (with \codequote())?
This is useful if you want to save an expression in a variable.
看起来很简单。所以我建立了这个虚拟示例:
library(shiny)
library(explodingboxplotR)
# ui.R
shinyUI(
fluidPage(
titlePanel("Exploding Boxplot Test"),
mainPanel(
exploding_boxplotOutput("box")
)
)
)
# server.R
data(iris)
shinyServer(function(input, output, session) {
output$box <- renderExploding_boxplot({
print("ping")
exploding_boxplot(
data.frame(
rowname = rownames(iris),
iris,
stringsAsFactors = FALSE
),
y = "Sepal.Length",
group = "Species",
color = "Species",
label = "Species"
)
})
})
库(闪亮)
库(explodingboxplotR)
#用户界面
新余(
流动摄影(
titlePanel(“爆炸箱线图试验”),
主面板(
分解图输出(“框”)
)
)
)
#服务器.R
数据(iris)
shinyServer(功能(输入、输出、会话){
输出$box问题在库更新后解决。Cf.您能否提供答案并接受它,以便未来用户可以参考它,谢谢实际上没有答案。我的代码现在“按原样”工作,因为包所有者已修复。我是否应该删除我的问题?问题在库更新后解决。Cf.您能否提供答案和acc请接受它,以便将来的用户可以引用它,谢谢,实际上没有答案。我的代码现在“按原样”工作,因为包所有者已经修复了它。我应该删除我的问题吗?