Guest User

Untitled

a guest
Dec 12th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. ---
  2. title: "Date Slider Bug"
  3. output:
  4. flexdashboard::flex_dashboard:
  5. orientation: rows
  6. ---
  7.  
  8. ```{r setup, include=FALSE, message=FALSE}
  9. library(flexdashboard)
  10. library(crosstalk)
  11. library(d3scatter)
  12. library(dplyr)
  13. ```
  14.  
  15. ```{r load_data, include=FALSE}
  16.  
  17. shared_mtcars <- SharedData$new(
  18. mtcars %>%
  19. mutate(date = Sys.Date() + gear)
  20. )
  21.  
  22. ```
  23.  
  24.  
  25. Inputs {.sidebar}
  26. -------------------------------------
  27.  
  28. ```{r}
  29.  
  30. filter_checkbox("cyl", "Cylinders", shared_mtcars, ~cyl, inline = TRUE)
  31. filter_slider("date", "Date", shared_mtcars, ~date, width = "100%")
  32.  
  33. ```
  34.  
  35.  
  36.  
  37. Row {data-width=650}
  38. -----------------------------------------------------------------------
  39.  
  40. ### Scatter Plot
  41.  
  42. ```{r}
  43.  
  44. d3scatter(shared_mtcars, ~wt, ~mpg, ~factor(cyl), width="100%", height=250)
  45.  
  46. ```
Add Comment
Please, Sign In to add comment