llrs / experDesign

Compare a328d3d ... +18 ... 330fd39

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 3 of 18 files from the diff.
Other files ignored by Codecov
paper.Rmd has changed.
_pkgdown.yml has changed.
DESCRIPTION has changed.
.gitignore has changed.
NEWS.md has changed.
.Rbuildignore has changed.
cran-comments.md has changed.
paper.md has changed.
codemeta.json has changed.
README.Rmd has changed.
README.md has changed.
man/inspect.Rd has changed.

@@ -3,7 +3,8 @@
Loading
3 3
#' Given the index and the data of the samples append the batch assignment
4 4
#' @param i List of indices of samples per batch
5 5
#' @param pheno Data.frame with the sample information.
6 -
#' @param omit Name of the columns of the `pheno` that will be omitted
6 +
#' @param omit Name of the columns of the `pheno` that will be omitted.
7 +
#' @param index_name Column name of the index of the resulting data.frame.
7 8
#' @return The data.frame with a new column batch with the name of the batch the sample goes to.
8 9
#' @export
9 10
#' @examples
@@ -13,8 +14,11 @@
Loading
13 14
#'                 iterations = 10)
14 15
#' batches <- inspect(index, survey[, columns])
15 16
#' head(batches)
16 -
inspect <- function(i, pheno, omit = NULL) {
17 +
inspect <- function(i, pheno, omit = NULL, index_name = "batch") {
17 18
  batch <- batch_names(i)
19 +
  i <- unlist(i, FALSE, FALSE)
20 +
  i <- sort(i)
21 +
  pheno <- pheno[i, ]
18 22
19 23
  # Omit columns
20 24
  if (!is.null(omit)) {
@@ -23,7 +27,9 @@
Loading
23 27
    pheno_o <- pheno
24 28
  }
25 29
26 -
  cbind(pheno_o, batch)
30 +
  out <- cbind(pheno_o, batch)
31 +
  colnames(out)[ncol(out)] <- index_name
32 +
  out
27 33
}
28 34
29 35

@@ -20,10 +20,17 @@
Loading
20 20
#' index
21 21
design <- function(pheno, size_subset, omit = NULL, iterations = 500,
22 22
                   name = "SubSet") {
23 +
  stopifnot(is.numeric(size_subset) && is.finite(size_subset))
24 +
  stopifnot(length(dim(pheno)) == 2)
25 +
  stopifnot(is.numeric(iterations) && is.finite(iterations))
26 +
  stopifnot(is.character(name))
23 27
  opt <- Inf
24 28
25 29
  # Calculate batches
26 30
  size_data <- nrow(pheno)
31 +
  if (size_subset >= size_data) {
32 +
    stop("All the data can be done in one batch.", call. = FALSE)
33 +
  }
27 34
  batches <- optimum_batches(size_data, size_subset)
28 35
29 36
  if (!valid_sizes(size_data, size_subset, batches)) {
@@ -86,9 +93,14 @@
Loading
86 93
#' head(index)
87 94
replicates <- function(pheno, size_subset, controls, omit = NULL,
88 95
                       iterations = 500){
89 -
  stopifnot(is.numeric(size_subset))
90 -
  stopifnot(is.numeric(controls))
96 +
  stopifnot(is.numeric(size_subset) && is.finite(size_subset))
97 +
  stopifnot(length(dim(pheno)) == 2)
98 +
  stopifnot(is.numeric(iterations) && is.finite(iterations))
91 99
100 +
  size_data <- nrow(pheno)
101 +
  if (size_subset >= size_data) {
102 +
    stop("All the data can be done in one batch.", call. = FALSE)
103 +
  }
92 104
  if (size_subset < controls) {
93 105
    stop("The controls are technical controls for the batches.\n\t",
94 106
         "They cannot be above the number of samples per batch.", call. = FALSE)

@@ -19,6 +19,9 @@
Loading
19 19
spatial <- function(index, pheno, omit = NULL, remove_positions = NULL, rows = LETTERS[1:5],
20 20
         columns = 1:10, iterations = 500) {
21 21
22 +
  stopifnot(length(dim(pheno)) == 2)
23 +
  stopifnot(is.numeric(iterations) && is.finite(iterations))
24 +
22 25
  nrow <- length(rows)
23 26
  ncol <- length(columns)
24 27
@@ -33,6 +36,7 @@
Loading
33 36
         "\n\tPlease check the rows and columns or how you created the index.",
34 37
         call. = FALSE)
35 38
  }
39 +
36 40
  plate <- matrix(nrow = nrow, ncol = ncol, dimnames = list(rows, columns))
37 41
  positions <- position_name(rows, columns)
38 42
  if (any(!remove_positions %in% positions$name)) {

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
QC.R 90.70%
designer.R -1.43% 85.42%
entropy.R 100.00%
evaluate.R 97.96%
evaluate_category.R 100.00%
evaluate_num.R 100.00%
indexing.R 82.14%
optimum.R 86.67%
reporting.R +4.46% 85.71%
spatial.R 0.82% 81.25%
utils.R 83.78%
Folder Totals (11 files) 89.18%
Project Totals (11 files) 89.18%
Loading