Skip to content

Commit

Permalink
Removing buggy example in pkgdown
Browse files Browse the repository at this point in the history
  • Loading branch information
gvegayon committed Feb 11, 2020
1 parent 3789e01 commit a841db8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 32 deletions.
32 changes: 16 additions & 16 deletions R/stats.R
Original file line number Diff line number Diff line change
Expand Up @@ -1218,22 +1218,22 @@ vertex_mahalanobis_dist <- function(graph, X, S) {
#' # Are these equal?
#' all(ans0[] == ans1[]) # Should yield TRUE
#'
#' # More elaborated example (speed) -------------------------------------------
#'
#' set.seed(123123123)
#' A <- rgraph_ba(t = 5e3, m = 2)
#' B <- rgraph_ba(t = 5e3, m = 2)
#'
#' Am <- as.matrix(A)
#' Bm <- as.matrix(B)
#'
#' compfun <- function(a,b) {
#' ifelse(a > b, a, b)
#' }
#'
#' t0 <- system.time(matrix_compare(A, B, compfun))
#' t1 <- system.time(matrix(ifelse(Am > Bm, Am, Bm), ncol=ncol(Am)))
#' t1/t0
# # More elaborated example (speed) -------------------------------------------
#
# set.seed(123123123)
# A <- rgraph_ba(t = 5e3, m = 2)
# B <- rgraph_ba(t = 5e3, m = 2)
#
# Am <- as.matrix(A)
# Bm <- as.matrix(B)
#
# compfun <- function(a,b) {
# ifelse(a > b, a, b)
# }
#
# t0 <- system.time(matrix_compare(A, B, compfun))
# t1 <- system.time(matrix(ifelse(Am > Bm, Am, Bm), ncol=ncol(Am)))
# t1/t0
#' @aliases binary-functions
#' @family dyadic-level comparison functions
matrix_compare <- function(A, B, fun) {
Expand Down
16 changes: 0 additions & 16 deletions man/matrix_compare.Rd

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

0 comments on commit a841db8

Please sign in to comment.