mk_table_ind_obs {ruminate} | R Documentation |
Creates Tables of Individual Observations from PKNCA Result
Description
Takes the output of PKNCA and creates a tabular view of the individual observation data. This can be spread out of over several tables (pages) if necessary.
Usage
mk_table_ind_obs(
nca_res,
obnd = NULL,
not_sampled = "NS",
blq = "BLQ",
digits = 3,
text_format = "text",
max_height = 7,
max_width = 6.5,
max_row = NULL,
max_col = 9,
notes_detect = NULL,
rows_by = "time"
)
Arguments
nca_res |
Output of PKNCA. |
obnd |
onbrand reporting object. |
not_sampled |
Character string to use for missing data when pivoting. |
blq |
Character string to use to indicate data below the level of quantification (value of 0 in the dataset). |
digits |
Number of significant figures to report (set to |
text_format |
Either |
max_height |
Maximum height of the final table in inches (A value of |
max_width |
Maximum width of the final table in inches (A value of |
max_row |
Maximum number of rows to have on a page. Spillover will hang over the side of the page.. |
max_col |
Maximum number of columns to have on a page. Spillover will be wrapped to multiple pages. |
notes_detect |
Vector of strings to detect in output tables (example |
rows_by |
Can be either "time" or "id". If it is "time", there will be a column for time and separate column for each subject ID. If rows_by is set to "id" there will be a column for ID and a column for each individual time. |
Value
List containing the following elements
isgood: Boolean indicating the exit status of the function.
one_table: Dataframe of the entire table with the first lines containing the header.
one_body: Dataframe of the entire table (data only).
one_header: Dataframe of the entire header (row and body, no data).
tables: Named list of tables. Each list element is of the output
msgs: Vector of text messages describing any errors that were found. format from
build_span
.
Examples
id = "NCA"
id_UD = "UD"
id_DW = "DW"
id_ASM = "ASM"
# We need a state variable to be define
sess_res = NCA_test_mksession(session=list(),
id = id,
id_UD = id_UD,
id_DW = id_DW,
id_ASM = id_ASM,
full_session=FALSE)
state = sess_res$state
# Pulls out the active analysis
current_ana = NCA_fetch_current_ana(state)
# This is the raw PKNCA output
pknca_res = NCA_fetch_ana_pknca(state, current_ana)
# Building the figure
mk_res = mk_table_ind_obs(nca_res = pknca_res)
mk_res$tables[["Table 1"]]$ft