Q:

Fixing a column in Shiny DataTable while Scrolling Right Does not Work

I am just trying to keep the left most column fixed when scrolling right with the ScrollX enabled, and just can't get it to work.  Any idea what I need to do different? 
library(shiny)
library(DT)

ui <- fluidPage(
  fluidRow(mainPanel(DT::dataTableOutput('mtcars'), width = 12))
  )
server <- server <- function(input, output, session) {
  output$mtcars <- DT::renderDataTable({
    mtcars %>%
      DT::datatable(
        selection = 'none', rownames = '', filter = 'none',
        options = list(
          paging = TRUE, searching = TRUE, info = FALSE,
          sort = TRUE, scrollX = TRUE, fixedColumns = list(leftColumns = 1)
          )
        )
    })
  }
shinyApp(ui = ui, server = server)

Version info here:
> packageVersion('DT')
[1] ‘0.4.16’
> packageVersion('shiny')
[1] ‘1.1.0’
> version
               _                           
platform       x86_64-w64-mingw32          
arch           x86_64                      
os             mingw32                     
system         x86_64, mingw32             
status                                     
major          3                           
minor          3.1                         
year           2016                        
month          06                          
day            21                          
svn rev        70800                       
language       R                           
version.string R version 3.3.1 (2016-06-21)
nickname       Bug in Your Hair   

A:

Two problems:

You need the extension FixedColumns;
The first column is actually leftColumns = 2, not leftColumns = 1 (which is for the row names, I guess). 

mtcars %>%
  DT::datatable(
    selection = 'none', rownames = '', filter = 'none',
    extensions = "FixedColumns",
    options = list(
      paging = TRUE, searching = TRUE, info = FALSE,
      sort = TRUE, scrollX = TRUE, fixedColumns = list(leftColumns = 2)
    )
  )

