Shiny

Add external hyperlink to tabPanel or navbarMenu in r Shiny

送分小仙女□ 提交于 2021-01-29 10:11:43
问题 I am trying to add external hyperlinks to the tabPabel and navbarMenu tabs/dropdowns in a navbarPage setup in Shiny (using bootstrapPage ). I found multiple questions that refer to linking to another tab within a Shiny app, but I want to specifically link to another webpage without opening a new browser window. I found the following questions that kind of get there: How to direct to another web page after clicking tabPanel in Shiny App Open URL by tabPanel in Shiny The second question is what

Vertical alignment of numericInput in DT

大憨熊 提交于 2021-01-29 09:49:54
问题 I've been trying to vertically align the elements inside a dataframe rendered by dt, to do this I used the className = "dt-center" arguments inside the options of the datatable function, while this works for most of the elements of my dataframe, it does not center the numericInput inside it. I tried to use the "vertical-align" = "middle" css argument with the formatStyle function, but this does not change the alignment of the numericInput either. Would there be a way to align these

how to change column names in rshiny using reactive function

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-29 09:45:47
问题 I am uploading one csv file and to standardize the code I want to change the column names. so I am using following code: Prv_mnth_so1 <- reactive({data.frame(lapply(data_uploaded1(),trimws))}) colnames(Prv_mnth_so1()) <- c("GST_ward","Category","order_and_section","combo") but this throws an error Warning: Error in <-: invalid (NULL) left side of assignment 52: server [#12] Error in colnames(Prv_mnth_so1()) <- c("GST_ward", "Category", "order_and_section", : invalid (NULL) left side of

How to solve shiny mis-alignment issue in datatable?

拜拜、爱过 提交于 2021-01-29 09:25:16
问题 I am trying to make all columns in the datatable the same width align the datatable (both header and its content) to the left enable horizontal scrolling once it reaches mainPanel width but my datatable gets automatically centered to the mainPanel, its header and content are also misaligned. Example: library(shiny) library(dplyr) library(DT) ui <- fluidPage( titlePanel("Test Example"), mainPanel( width = 10, dataTableOutput("cars.table") ) ) server <- function(input, output) { output$cars

Matching Parent/Child data up in a DataTable in R Shiny app

戏子无情 提交于 2021-01-29 09:22:31
问题 I have two dataframes; markets is the parent row and mix_breakout is the child table. Each parent row has their own unique child table. I am trying to only have the mix_breakout data that is unique to the parent markets show up in the nested table. For example, the parent row that has the market ABILENE-SWEETWATER should only show data from the same market in mix_breakout . There also can be an arbitrary number of market / mix_breakout here. This example shows 2 combos, but there can be up to

Editable calculation with DT table in Shiny

天涯浪子 提交于 2021-01-29 08:47:50
问题 I've been at this for awhile and have read a bunch but I still can't wrap my head around how to make this work. Is there a simple solution? I want to edit a DT table in my shiny app and, upon editing, I'd like there to be a change in a column that aggregates two values. Here is an example: library(tidyverse) library(shiny) library(DT) mt <- mtcars %>% select(mpg, cyl) %>% head() ui <- fluidPage( DTOutput(outputId = "final_tbl") ) server <- function(input, output){ dat <- reactive({ d <- mt %>

Add a new row to a dataframe by clicking on a datatable row and actionbutton

白昼怎懂夜的黑 提交于 2021-01-29 08:46:47
问题 I have the shiny app and the dataframes below. When I click on a row I get a text which displays the similarity of this attribute_name with a . If I click Next I get the similarity of the same attribute_name with the next candidate_2 . I want to be able to press the Add actionbutton() and add this candidate_2 to the related selectInput() in the table. For example if I click on the 1st row of the table and press Add the word micro will be added in the selectInput() of the first row. Basically

Shiny Dynamic UI Resetting to Original Values

泪湿孤枕 提交于 2021-01-29 08:39:17
问题 I have created a dynamic UI with the number of rows of a 'table' defined by a slider. I would like to use the numericInputs from the UI to perform further calculations. In the example below I have tried to calculate a rate from the two numeric inputs, which seems to work when new values are entered but immediately defaults back to the original starting values. I tried using a button and changing the observe to an observeEvent to calculate the rates which worked to generate the result, but did

r shiny - display data frame after uploading

流过昼夜 提交于 2021-01-29 08:31:06
问题 I am trying to build a record linkage app in R shiny. I have been using R for a while but am new to shiny. My problem is I am struggling to figure out how to display the file I upload via fileInput . My code is below. library(shiny) library(shinydashboard) ui ui <- dashboardPage( dashboardHeader(title = "Record Linkage App"), dashboardSidebar( sidebarMenu( ## Tab 1 -- Specify Task menuItem("Select Task And Upload Files", tabName = "task", icon = icon("file-text-o")), ## Tab 2 -- View Raw Data

R Shiny Reactive values, dplyr filter error?

一世执手 提交于 2021-01-29 08:29:20
问题 I am trying to figure out as I select input in UI to immediately reflect the results on page. My search results led me to look into reactive expression and reactive values. But as I am trying to filter the value on data, I think it is causing some complication yet I have no clue what I am supposed to do with this. It seems like the filter function doesn't seem to work though. This is the error message: Warning: Error in UseMethod: no applicable method for 'filter_' applied to an object of