-
Notifications
You must be signed in to change notification settings - Fork 8
/
skeleton_qmd_info.R
48 lines (46 loc) · 2.24 KB
/
skeleton_qmd_info.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#' Create skeleton for \code{qmd_info}
#'
#' @description Create skeleton for \code{qmd_info} as a manual alternative to \code{import_qmd_info}
#'
#' @param help logical if \code{TRUE} help will be added in the \code{qmd_info} skeleton.
#'
#' @seealso \code{\link{import_qmd_info}}, \code{\link{read_nmtab}}, \code{\link{parse_nonmem_model}}
#' @return A list containing the fixed effect (\code{theta}), random effect variance (\code{omega})
#' typical values along with their uncertainty, the indivudual parameters (\code{data}),
#' the nonmem ADVAN (\code{advan}), the model differential equations (\code{des}),
#' the parsed compartment information (\code{parsed_comp}), and the parsed arrow
#' information (\code{parsed_arrow}).
#' @examples
#' \dontrun{
#' qmd_info <- skeleton_qmd_info()
#' }
#' @export
skeleton_qmd_info <- function(help = TRUE) {
if (help) {
out <- list(descr = 'Model description [character string, optional]',
theta = 'Theta typical values and RSE (%) [data.frame, required]',
omega = 'Omega typical values (%) and RSE (%) [data.frame, optional]',
data = 'Individual parameter values [data.frame, optional]',
advan = 'Nonmem ADVAN subroutine [integer, required]',
des = 'Model Differential equations [integer, required if advan 6, 8 or 13]',
parsed_comp = 'Parsed compartment information [data.frame, required]',
parsed_arrow = 'Parsed arrow information [data.frame, required]'
)
} else {
out <- list(descr = NULL,
theta = NULL,
omega = NULL,
data = NULL,
advan = NULL,
des = NULL,
parsed_comp = data.frame(label = as.character(),
prm = as.character(),
output = as.character()),
parsed_arrow = data.frame(from = as.character(),
to = as.character(),
prm = as.character(),
dir = as.character())
)
}
return(out)
}