selectR: Create a select box

Description Usage Arguments Value Details

View source: R/selectR.R

Description

This is the main function of the package. It can be used to create select boxes and pass various options, among which the library to be used to render the select box (currently only select2 is supported).

Usage

1
2
selectR(data_frame, text, selections = NULL, selections_format = NULL,
  id = NULL, library = "select2", folder = NULL, ...)

Arguments

data_frame

A data frame, or an object coercible to one

text

The bare name of the column containing the text for the selector

selections

The bare name of the column containing the data for the possible selections

id

The bare name of the column containing the ids for the selector

library

The library used to render the select box; see details

folder

The folder used to save to disk intermediate files; see details.

...

Other parameters to be passed to the selector library

selection_format

If the selections are plots or functions returning plots, the format to be used for the plots. See details.

Value

An object of class selector

Details

The selections parameter must be the bare (unquoted) name of the column in the dataframe that contains the selections (plots or widgets) to be associated to the selector. If the selection column contains functions, it is assumed that these functions return plots that can be converted to either png or svg. If the selection column contains plots, one can specify whether they are to be rendered as png (default) or as svg (using the svglite package).


riccardopinosio/selectR documentation built on May 14, 2019, 11:13 a.m.