Package 'RagGrid'

Title: A Wrapper of the 'JavaScript' Library 'agGrid'
Description: Data objects in 'R' can be rendered as 'HTML' tables using the 'JavaScript' library 'ag-grid' (typically via 'R Markdown' or 'Shiny'). The 'ag-grid' library has been included in this 'R' package. The package name 'RagGrid' is an abbreviation of 'R agGrid'.
Authors: Srikkanth M [aut, cre], Praveen N [aut, ctb]
Maintainer: Srikkanth M <[email protected]>
License: MIT + file LICENSE
Version: 0.2.0
Built: 2024-09-13 06:40:42 UTC
Source: https://github.com/no-types/raggrid

Help Index


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

aggrid(iris)

Dependency Path

Description

Dependency Path

Usage

depPath(...)

Arguments

...

plugin


Format table columns

Description

Format table columns

Usage

formatColumns(table, columns, format)

Arguments

table

a table object created from aggrid()

columns

the indices of the columns

format

format based on numeral.js (see http://numeraljs.com/#format);


Get dependencies

Description

Get dependencies

Usage

getDeps(plugin, version)

Arguments

plugin

plugin

version

version


Shiny bindings for RagGrid

Description

Output and render functions for using RagGrid within Shiny applications and interactive Rmd documents.

Usage

RagGridOutput(outputId, width = "100%", height = "400px")

renderRagGrid(expr, env = parent.frame(), quoted = FALSE)

Arguments

outputId

output variable to read from

width, height

Must be a valid CSS unit (like '100%', '400px', 'auto') or a number, which will be coerced to a string and have 'px' appended.

expr

An expression that generates a RagGrid

env

The environment in which to evaluate expr.

quoted

Is expr a quoted expression (with quote())? This is useful if you want to save an expression in a variable.