SmartTable.Rd
A programmer interface to init and polutate jmvcore::Table
name
the name of the jmvcore::Table
table
nickname
the 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.
expandOnInit
if 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
expandOnRun
if 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.
expandSuperTitle
a character string. If not NULL, the expanded columns are supertitled with the string
expandFrom
from which column should the table be expanded
activated
SmartTable 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
key
This should be explained in a vignette
keys_sep
This should be explained in a vignette
keys_raise
This should be explained in a vignette
spaceBy
a 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.
spaceAt
a 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.
spaceMethod
I do not remeber what this does, but it was cool
indent
a vector of row indices. Indent (shift a bit on the right) the value of the first column of each row index provided
combineBelow
a 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_info
this requires a vignette
columnTitles
a named list of the form list(name=label). Change the title of
a jamovi table column named name
to label
.
initSource
If 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
runSource
If 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
activateOnData
If 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 #'
title
a string. Set the title of the jamovi table
superTitle
a named list list(columnname=value). Set the superTitle
of columnname
column to a value
setColumnVisible
a list of column names to set visible
hideOn
a 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
debug
a 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)
table
A jamovi table of class jmvcore::Table
estimator
optional 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.
aroot
a string with the root name of the two columns. For example for es_upper
and es_lower
the root is es
.
width
the width of the confidence interval.
label
default NULL, prefix to put to the title of the Super Title.
format
a format
string of the type {}% something as a title
. Default is "{}% Confidence Intervals"
.