我想自定义我的闪亮应用程序的框状态的颜色.我找到一种css方式来改变这些盒子的盒子背景颜色,但不是自定义状态颜色,但是我没有在css中看到等效的"status"参数?因此,我打印一个包含所考虑的参数"status"的简单页面的源代码,我正在查看它的类(我认为class ="box box-solid box-primary")但我无法在几个中找到它.css在这个网页上提供...... :(
你有好主意吗 ?
这是一个简单的代码:
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(),
dashboardBody(
fluidRow(
box(width = 6, title = "youhou", status = "primary", solidHeader = TRUE,
"Box content"
)
)
)
)
server <- function(input, output) {}
shinyApp(ui, server)
Run Code Online (Sandbox Code Playgroud)
预先感谢您的任何帮助 !
查
由于使用RStudio,devtools和roxygen2,我目前正在使用R6类创建我的第一个R包(:D)。当我的软件包仅包含函数时,我可以毫无问题地构建和加载它。但是,当我想记录R6类(在此包https://cran.r-project.org/web/packages/data.tree/data.tree.pdf中具有“节点”之类的字段和方法)时,RStudio不会不想构建软件包。我试图在论坛上找到窍门,但是有关此问题的信息很少
我的程序:
->至此,程序就可以了,因为我使用“ man”获得了正确的结构,并带有我的不同类的描述,“ R”使用了这些类的不同脚本。
但是,当我尝试构建并重新加载程序包(事先已加载R6程序包)时,出现错误:
==> R CMD INSTALL --no-multiarch --with-keep.source esa
* installing to library ‘/home/cha/R/x86_64-pc-linux-gnu-library/3.0’
* installing *source* package ‘esa’ ...
** R
** preparing package for lazy loading
Error in eval(expr, envir, enclos) :
impossible de trouver la fonction "R6Class" (translation: impossible to find the function "R6Class")
Error : unable to load R code in package ‘esa’
ERROR: lazy loading failed for package ‘esa’
* removing ‘/home/cha/R/x86_64-pc-linux-gnu-library/3.0/esa’
* restoring previous ‘/home/cha/R/x86_64-pc-linux-gnu-library/3.0/esa’ …Run Code Online (Sandbox Code Playgroud) 我尝试使用"plotly"R包在R图形中绘制图像.
我首先尝试从本地计算机中包含一个图像:
library(plotly)
outfile <- tempfile(fileext = ".png")
png(outfile)
plot(rnorm(200), rnorm(200))
dev.off()
plot_ly(x = c(1, 2, 3), y = c(1, 2, 3)) %>%
layout(
images = list(
list(
source = outfile,
xref = "x",
yref = "y",
x = 1,
y = 1,
sizex = 2,
sizey = 2,
sizing = "stretch",
opacity = 0.4,
layer = "below"
)
)
)
Run Code Online (Sandbox Code Playgroud)
但我没有设法做到这一点.然后我认为那是因为情节显然需要http或https图像.
第一个问题:是否可以从本地文件导入图像(显然可以使用python:https://plot.ly/python/images/)?
由于似乎无法嵌入本地图像,我尝试导入我在Github上传的图像.但它似乎既不工作:
library(plotly)
plot_ly(x = c(1, 2, 3), y = c(1, 2, 3)) %>% …Run Code Online (Sandbox Code Playgroud)