r-rudra / tidycells

Automatic transformation of untidy spreadsheet-like data into tidy form
https://r-rudra.github.io/tidycells/
Other
83 stars 10 forks source link

Planned activities for 0.3 #14

Open bedantaguru opened 4 years ago

bedantaguru commented 4 years ago

These are the planned activity for 0.3.0 These are in progress in nightly Few of these may be dropped (as all of these are experimental)

bedantaguru commented 4 years ago

Also, follow a release routine for stability in the release process.

bedantaguru commented 4 years ago

Here are a few references for

{DT} based table plots

require(tidycells)
require(DT)

xl <- tidyxl::xlsx_cells("inst/extdata/marks.xlsx")
fmt <-tidyxl::xlsx_formats("inst/extdata/marks.xlsx")

cd <- as_cell_df(xl)

cdd <- as.data.frame(cd)

require(shiny)

std_opts <- list(
  pageLength = 10,
  keys = TRUE,
  sDom = '<"top">lrt<"bottom">pB',
  deferRender = TRUE,
  #scrollX = TRUE,
  scrollX= 400,
  scrollY = 500,
  scroller = TRUE,
  scrollCollapse = TRUE,
  ordering = FALSE,
  fixedColumns = TRUE,
  fixedHeader = TRUE
)

runGadget(shinyApp(
  ui = fluidPage(DTOutput("dt")),
  server = function(input, output){
    output$dt <- renderDT({
      datatable(cdd,
                escape = FALSE,
                rownames = TRUE,
                style = "bootstrap",
                fillContainer = FALSE,
                class = "cell-border stripe",
                extensions = c("KeyTable", "Scroller","FixedHeader"),
                selection = list(target = 'cell'),
                #editable = TRUE,
                options = std_opts)
    })
  }
))

I'll test it and keep a watch on the same.

bedantaguru commented 4 years ago

Just tested this feature as mentioned here it is still not well connected to shiny. Hence going ahead with DT option. Maybe in later versions of DT this feature will be implemented.

(Here is the comment on this from DT developer)

DT has its own implementation of row/column/cell selections in Shiny, which is very different from the Select extension. In particular, the Select extension is unlikely to work in the server-side processing mode. On the other hand, DT’s implementation does not allow multiple selections via the Shift/Ctrl keys at the moment.

bedantaguru commented 4 years ago

It [DT and Shiny with Select Extension] seems doable. However, this should be kept as an optional feature.