billdenney / pknca
Showing 2 of 4 files from the diff.

@@ -210,7 +210,7 @@
Loading
210 210
  stopifnot("all cols must be named"=!any(names(cols) %in% ""))
211 211
  stopifnot("all original cols names must be names of x"=all(unlist(cols) %in% names(x)))
212 212
  stopifnot("group_cols must be NULL or a character vector"=is.null(group_cols) || is.character(group_cols))
213 -
  if (!is.null(group_cols)) {
213 +
  if (!is.null(group_cols) && (length(group_cols) > 0)) {
214 214
    stopifnot("group_cols must not overlap with other column names"=!any(group_cols %in% unlist(cols)))
215 215
    stopifnot("group_cols must not overlap with standardized column names"=!any(group_cols %in% names(cols)))
216 216
    new_group_cols <- paste0("group", seq_along(group_cols))
@@ -233,7 +233,7 @@
Loading
233 233
}
234 234
235 235
restore_group_col_names <- function(x, group_cols=NULL) {
236 -
  if (is.null(group_cols)) {
236 +
  if (is.null(group_cols) || (length(group_cols) == 0)) {
237 237
    return(x)
238 238
  }
239 239
  new_group_cols <- paste0("group", seq_along(group_cols))

@@ -284,7 +284,7 @@
Loading
284 284
print.PKNCAconc <- function(x, n=6, summarize=FALSE, ...) {
285 285
  cat(sprintf("Formula for concentration:\n "))
286 286
  print(stats::formula(x), ...)
287 -
  if (is.na(x$subject)) {
287 +
  if (is.na(x$subject) || (length(x$subject) == 0)) {
288 288
    cat("As a single-subject dataset.\n")
289 289
  } else {
290 290
    cat(sprintf("With %d subjects defined in the '%s' column.\n",
Files Coverage
R 96.19%
Project Totals (33 files) 96.19%
1
comment: false
2

3
coverage:
4
  status:
5
    project:
6
      default:
7
        target: auto
8
        threshold: 1%
9
        informational: true
10
    patch:
11
      default:
12
        target: auto
13
        threshold: 1%
14
        informational: true
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading