NCA_fetch_current_obj {ruminate} | R Documentation |
Fetches the Current Analysis Object
Description
Takes the current state and object type and returns the currently selected object. For example if you have specified figure, it will look at the output figure selected and the figure number of that figure and return the ggplot object for that. by subject id highlighting of certain NCA aspects (e.g. points used for half-life)
Usage
NCA_fetch_current_obj(state, obj_type)
Arguments
state |
NCA state from |
obj_type |
Type of object to return (either "table" or "figure"). |
Value
List with a format that depends on the obj_type. For figures:
ggplot: ggplot object of the figure.
isgood: Return status of the function.
msgs: Messages to be passed back to the user.
For tables:
df: Dataframe of the current table.
ft: Flextable object of the current table.
notes: Any table notes to be included.
isgood: Return status of the function.
msgs: Messages to be passed back to the user.
Examples
# We need a state object to use below
sess_res = NCA_test_mksession(session=list(), full_session=FALSE)
state = sess_res$state
# Current active table:
res = NCA_fetch_current_obj(state, "table")
res$ft
# Current active figure:
res = NCA_fetch_current_obj(state, "figure")
res$ggplot