Learn R Programming

RagGrid (version 0.2.0)

aggrid: Create a HTML widget using the ag-grid library

Description

This function creates a HTML widget to display matrix or a dataframe using ag-grid.

Usage

aggrid(data, options = list(), colOpts = list(),
  formattingOptions = list(), sparkLineOptions = list(),
  theme = "ag-theme-balham", filterOnSelect = TRUE, licenseKey = NULL,
  width = NULL, height = NULL, elementId = NULL)

Arguments

data

a dataobject (either a matrix or a dataframe)

options

a list of ag-grid grid options (see https://www.ag-grid.com/javascript-grid-properties/);

colOpts

a list of ag-grid column options (see https://www.ag-grid.com/javascript-grid-column-definitions/);

formattingOptions

a list of ag-grid column formatting options (see http://numeraljs.com/#format) Also see formatColumns();

sparkLineOptions

options for rendering sparkline in the table

theme

a theme class name that need to be applied for grid (see https://www.ag-grid.com/javascript-grid-styling//);

filterOnSelect

specify whether filter is need to be perfromed on selecting a row item

licenseKey

if you wish to use the enterprise version of ag-grid

width, height

Width/Height in pixels (optional, defaults to automatic sizing)

elementId

An id for the widget (a random string by default).

Examples

Run this code
# NOT RUN {
aggrid(iris)

# }

Run the code above in your browser using DataLab