小编L10*_*0Yn的帖子

在 VS Code 中更改 R 版本

使用 RStudio 很长时间后,我正在尝试使用 VSCode。在 R Studio 中,很容易更改为以前的版本,但我不知道如何更改 VSCode 中使用的 R 版本。

r visual-studio-code

11
推荐指数
1
解决办法
3288
查看次数

R 闪亮亮/暗模式开关

我有一个基本的 R闪亮应用程序,我想为其构建一个亮/暗模式开关。我想如果我能让它在表格选项卡上工作,那么对于其余的工作应该没问题。我知道shinyjs是最好的方法,但我似乎无法在任何地方找到代码。

library(dplyr)
library(shiny)
library(shinythemes)

ui <- fluidPage(theme = shinytheme("slate"),
                tags$head(tags$style(HTML(
                  "
                  .dataTables_length label,
                  .dataTables_filter label,
                  .dataTables_info {
                      color: white!important;
                      }

                  .paginate_button {
                      background: white!important;
                  }

                  thead {
                      color: white;
                      }

                  "))),
                mainPanel(tabsetPanel(
                  type = "tabs",
                  tabPanel(
                    title = "Table",
                    icon = icon("table"),
                    tags$br(),
                    DT::DTOutput("table")
                  )
                )))

server <- function(input, output) {
  output$table <- DT::renderDT({
    iris
  })
}

shinyApp(ui = ui, server = server)
Run Code Online (Sandbox Code Playgroud)

r shiny

8
推荐指数
1
解决办法
4539
查看次数

R 闪亮的表格改变标题和浅暗模式切换

我正在对 Covid-19 进行基本可视化,在其中一个选项卡中我有一张表格。我似乎无法将表格上方和下方的文字以另一种颜色显示。我添加了一张图像,突出显示了我需要更改的文字。

https://i.stack.imgur.com/qbcke.png

我还想构建一个浅色和深色模式,但我找不到任何可以以我现在拥有的应用程序的形式工作的代码。我的存在这些问题的代码目前如下

library(dplyr)
library(shiny)
library(shinythemes)

####################### READ CSV #############################
ncov <- read.csv("https://raw.githubusercontent.com/datasets/covid-19/master/data/time-series-19-covid-combined.csv")
ncov = ncov %>% rename(Country = Country.Region)
###########################################################

ui <- fluidPage(
  theme = shinytheme("slate"),
  tags$head(
    tags$style(
      "
@import url('https://fonts.googleapis.com/css?family=Pacifico&display=swap');

h2 {
    font-family: 'Pacifico', cursive;
    font-size: 48px;
    margin-bottom: 25px;
}
ul.nav li a {
    background-color: lightgrey;
}

    #To change text and background color of the `Select` box 
    .dataTables_length select {
      color: #0E334A;
        background-color: #0E334A
    }

  ##To change text and background color of the `Search` box 
  .dataTables_filter input …
Run Code Online (Sandbox Code Playgroud)

css r datatables shiny dt

5
推荐指数
1
解决办法
1069
查看次数

标签 统计

r ×3

shiny ×2

css ×1

datatables ×1

dt ×1

visual-studio-code ×1