Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

265
Vistas
¿Cómo habilitar la selección de filas en las páginas, el filtrado y la búsqueda en un DT (DataTable) integrado en R-markdown?

Tengo una pregunta interesante. ¿Cómo puedo obtener el efecto donde puedo seleccionar filas en un DT (DataTable) incorporado R-markdown en páginas y filtrado? Esto sería realmente útil ya que las filas seleccionadas a través del filtro, las páginas y las búsquedas en un marco de datos grande se pueden exportar fácilmente con los botones integrados a, por ejemplo, CSV. Necesito el javascript a continuación traducido a R.

Aquí está hecho en Javascript; https://datatables.net/examples/server_side/select_rows.html

Aquí está mi DT incorporado en R-markdown:

 #DT table of departures with detailed filtering Customer_card_DT <- DT:: datatable(Customercard_all, #container = sketch, filter = "top", #adds filter options to each column (filter can be "top" or "bottom") class = "cell-border stripe hover order-column", #adds some basic styling to the table and reducing white-space with compact, highlight on mouseover with hover, and hightlight the column that is used for filtering with order-column #caption = "Customer Card", rownames = F, #Removing row name indexes editable = TRUE, #allows the table to be edited in the final output #colnamnes code below does nothing after adding colnames in container # colnames = c("PO reg", "Art", "Product", "QTY", "Destination", "ETA", "Days left", "Tracking", "Change in ETA", # "Type", "Containers", "Purch.value"), #changes column names in the final output extensions = c("Buttons", "KeyTable", "Select"), #adds buttons at the top of the table which allow the user to export the data selection = 'none', options = list( #Use the code below to hide all columns that are basicly default in a SPO upload. It shows up on export anyways. #columnDefs = list(list(visible=FALSE, targets=c(13,14))), pageLength = 30, autoWidth = TRUE, keys = TRUE, #For KeyTable entension which creates border of current cell and that enables excel style navigation between cells dom = 'Bfrtip', #For buttons select = list(style = 'os', items = 'row'), buttons = c('copy', 'csv', 'excel', 'pdf', 'print', I('colvis'), "selectCells", "selectRows", "selectNone"))) #adds buttons at the top of the table which allow the user to access different functionalities Customer_card_DT

¡Muchas gracias de antemano!

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda