Skip to content

Commit

Permalink
fix: fixed na.rm example
Browse files Browse the repository at this point in the history
  • Loading branch information
cvanderaa committed Sep 28, 2022
1 parent d5249ca commit 5daa72f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
15 changes: 5 additions & 10 deletions R/aggregate.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,22 +100,17 @@
##' c("S1", "S2")))
##' x
##'
##' ## simply use na.rm = TRUE to ignore missng values
##' ## simply use na.rm = TRUE to ignore missing values
##' ## during the aggregation
##'
##' (k <- LETTERS[c(1, 1, 2)])
##' aggregate_by_vector(x, k, colSums)
##' aggregate_by_vector(x, k, colSums, na.rm = TRUE)
##'
##'
##' ## NAs are propagated during the matrix
##' ## multiplication in the aggregation functon
##' (adj <- matrix(c(1, 1, 0, 0, 0, 1), ncol = 2,
##' dimnames = list(paste0("Pep", 1:3),
##' c("A", "B"))))
##'
##' aggregate_by_matrix(x, adj, colSumsMat)
##' ## not implemented
##' try(aggregate_by_matrix(x, adj, colSumsMat, na.rm = TRUE))
##' colSumsMat
##' c("A", "B"))))
##' aggregate_by_matrix(x, adj, colSumsMat, na.rm = FALSE)
##' aggregate_by_matrix(x, adj, colSumsMat, na.rm = TRUE)
##'
NULL
4 changes: 4 additions & 0 deletions man/aggregate.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5daa72f

Please sign in to comment.