SmartTable.RdA programmer interface to init and polutate jmvcore::Table
namethe name of the jmvcore::Table
tablenicknamethe unique identifier of the table used by other classes to dispatch messages to the table or to interact with it. It is usually used internally, but it is left public for ease to access and debug.
expandOnInitif TRUE, the jamovi table is expanded columnwise if the data.frame passed in the init are more than the ones defined in .r.yaml file. If FALSE (default) additional columns passed on init are ignored
expandOnRunif TRUE, the jamovi table is expanded columnwise if the data.frame passed in to the run function are more than the ones defined in .r.yaml file. If FALSE (default) additional columns passed on run are ignored.
expandSuperTitlea character string. If not NULL, the expanded columns are supertitled with the string
expandFromfrom which column should the table be expanded
activatedSmartTable are populated (run) if their source
is not NULL and they are visible. jamovi tables with visible: false
in the .r.yaml file can be make visible and activated with this option TRUE
keyThis should be explained in a vignette
keys_sepThis should be explained in a vignette
keys_raiseThis should be explained in a vignette
spaceBya vector of columns names, jmvcore::Table columns can add extra space
between rows to enhance readability. Passing one or more column names put an extra padding
when a new value is fond in the column.
spaceAta vector of rows indices, jmvcore::Table columns can add extra space
between rows to enhance readability. An extra space will be added after the rows with the provided
indices.
spaceMethodI do not remeber what this does, but it was cool
indenta vector of row indices. Indent (shift a bit on the right) the value of the first column of each row index provided
combineBelowa vector of column names or column indices. jmvcore::Table columns can hide repeated consecutive
values in a column by setting combineBelow: column property in r.yaml file. This option allows
to set this properties programmatically on execution. The special key new! means that all new
columns created at init or run time should be combineBelow.
ci_infothis requires a vignette
columnTitlesa named list of the form list(name=label). Change the title of
a jamovi table column named name to label.
initSourceIf estimator is not passed to initialize()
set the source of the init() data used to initialize the table.
It can be:
a data.frame
a list of named lists
a function returning a data.frame or a list of named lists
runSourceIf estimator is not passed to initialize()
set the source of the run() data used to initialize the table.
if can be:
a data.frame
a list of named lists
a function returning a data.frame or a list of named lists
activateOnDataIf TRUE, check if the table got some data. For tables with
visible: false is the r.yaml file, makes them visible
if data are passed to it #'
titlea string. Set the title of the jamovi table
superTitlea named list list(columnname=value). Set the superTitle
of columnname column to a value
setColumnVisiblea list of column names to set visible
hideOna named list list(name=value)
for columns in names(list(name=value))
hide the column if all its cells are equal to
value. Value it is typically Inf, NA or NaN
debuga logical.
Print debugging information in console. Default is FALSE of the value
of the constant t_INFO if exists.
new()Initialize the SmartTable object
SmartTable$new(table, estimator = NULL)tableA jamovi table of class jmvcore::Table
estimatoroptional R6. If set, SmartTable inquires
the R6 class for init and run functions to initialize and populate the jamovi Table.
the R6 class should provide functions using the convention init_[nickname] and run_[nickname] where the nickname` is the unique identifier given to the jamovi table. The unique identifiers can be
tablename: the name of the jmvcore::Table in jamovi .r.yaml file
groupname_tablename: the name of the jmvcore::Group parenting the table and the table name
arrayname: the name of the jmvcore::Array parenting the table and the table name
initTable()initialize the table from initSource or estimator::run_[tablename], and
set all the aestetical and behavioral options passed to the table.
runTable()fills the table from runSource or estimator::run_[tablename], and
takes care of all aesthetic adjustment required
ci()a wrapper function to set a superTitle over upper and lower limits columns of a confidence interval.
aroota string with the root name of the two columns. For example for es_upper and es_lower
the root is es.
widththe width of the confidence interval.
labeldefault NULL, prefix to put to the title of the Super Title.
formata format string of the type {}% something as a title. Default is "{}% Confidence Intervals".