Shiny

Parent/Child Rows in R

有些话、适合烂在心里 提交于 2020-03-17 03:05:04
问题 I'm trying to use some JavaScript to create a nice table layout with parents/child nesting. I only need one child per parent. I have two data frames. The goal here is to make a table that combines these two data frames. So far I am able to do that. However, the problem here is that I can only get the code to work for one row in df1. When I go to add in another row to df1 I get Error in data.frame: arguments imply differing number of rows: 1, 2 . For example, the desired result is achieved

Single/multiple conditions for columns formating with DT

自作多情 提交于 2020-03-05 04:06:48
问题 This is related to the question in this Is there any similar approach to conditional formating for multiple columns from excel in Shiny,, the solution provided works fine but I am a bit stack in how to extend the code to meet new requirement. So if I have the following dataframe and want to change the background color of five columns based on the following condition: for columns X,Y if -4 < X < 4 and Y < 10 color of X,Y is pink elseif Y >10 color of X,Y is bleu else X ="" or Y="" then color

Fail to save the file to the server side of shiny app

做~自己de王妃 提交于 2020-03-05 03:23:52
问题 I am trying to save a file on the server side of where I am running the shiny app but for some reason I don't see the path when I try to save it. Here is the code that I have it currently in the shiny app library(shinyFiles) shinySaveButton(id = 'download.scores', label = 'Save scores', title = "Save file as...", filetype = "csv") observe({ volumes <- c("wd"="/home/rstudio/data") shinyFileSave(input, "download.scores", roots=volumes, session=session) fileinfo <- parseSavePath(volumes, input

Adding images in the title and at the right of navbarPage

本小妞迷上赌 提交于 2020-03-05 00:24:59
问题 I would like to include a small image at the left of the title of my navbarPage , and to include another image completely at the right of this same navbarPage . I found this answer which provides the same layout than the one I would like to have. The problem is that this solution does not provide a fully reproducible example and I can't figure out how to include the chunks of code in the ui part. Does anybody know how to make a reproducible example from this answer? Here's what I've tried so

Shiny leaflet add large amount of separated polylines

允我心安 提交于 2020-03-04 04:51:01
问题 I have a 200k lines dataset containing coordonates of departures and destinations. I have a R shiny app with a leaflet map to show circles on these coordonates, which works very well despite the large amount of coordonates. Here is a simplified example of the data. Each line contains the travel id, latitude and longitude of the departure, latitude and longitude of the destination. id lat_begin lat_end lng_begin lng_end 1 1 46.49 46.27 2.65 7.66 2 2 45.94 49.24 7.94 0.76 3 3 48.07 49.50 2.05 2

Shiny leaflet add large amount of separated polylines

狂风中的少年 提交于 2020-03-04 04:50:11
问题 I have a 200k lines dataset containing coordonates of departures and destinations. I have a R shiny app with a leaflet map to show circles on these coordonates, which works very well despite the large amount of coordonates. Here is a simplified example of the data. Each line contains the travel id, latitude and longitude of the departure, latitude and longitude of the destination. id lat_begin lat_end lng_begin lng_end 1 1 46.49 46.27 2.65 7.66 2 2 45.94 49.24 7.94 0.76 3 3 48.07 49.50 2.05 2

have Rshiny app user upload image to dropbox /shiny server / google drive

寵の児 提交于 2020-03-02 10:54:53
问题 I am almost done creating a survey using Rshiny. I want to create a button that will allow the user to upload an image (jpeg,tiff,png etc) to the R shiny server, Dropbox, or google drive. It seems the fileInput method only accepts documents like csv? any help would be appreciated! 回答1: fileInput actually allows the import of any type of files. You just need to set the argument accept to NULL or to any file extension that you accept. What you need to understand first, is that if you use

Shiny datatable: Format row depending on two conditions

我是研究僧i 提交于 2020-03-01 23:16:58
问题 Currently I have this: datatable(SignalDataFrame,selection = 'single', options=list(dom='ft')) %>% #datatable(ResultDF, options=list(dom='ft')) %>% formatStyle( '200d MA', backgroundColor = styleInterval(0, c('#e6b8b7', '#d8e4bc')) ) %>% formatStyle( '50v200d MA', backgroundColor = styleInterval(0, c('#e6b8b7', '#d8e4bc')) ) %>% formatDate(c(3,5,6), "toLocaleDateString") }) As you see, style interval only formats values <0 in red and values >0 in green. I however want only to format cells in

Shiny datatable: Format row depending on two conditions

这一生的挚爱 提交于 2020-03-01 23:15:36
问题 Currently I have this: datatable(SignalDataFrame,selection = 'single', options=list(dom='ft')) %>% #datatable(ResultDF, options=list(dom='ft')) %>% formatStyle( '200d MA', backgroundColor = styleInterval(0, c('#e6b8b7', '#d8e4bc')) ) %>% formatStyle( '50v200d MA', backgroundColor = styleInterval(0, c('#e6b8b7', '#d8e4bc')) ) %>% formatDate(c(3,5,6), "toLocaleDateString") }) As you see, style interval only formats values <0 in red and values >0 in green. I however want only to format cells in

Shiny datatable: Format row depending on two conditions

假装没事ソ 提交于 2020-03-01 23:14:21
问题 Currently I have this: datatable(SignalDataFrame,selection = 'single', options=list(dom='ft')) %>% #datatable(ResultDF, options=list(dom='ft')) %>% formatStyle( '200d MA', backgroundColor = styleInterval(0, c('#e6b8b7', '#d8e4bc')) ) %>% formatStyle( '50v200d MA', backgroundColor = styleInterval(0, c('#e6b8b7', '#d8e4bc')) ) %>% formatDate(c(3,5,6), "toLocaleDateString") }) As you see, style interval only formats values <0 in red and values >0 in green. I however want only to format cells in