diff --git a/R/glet.R b/R/glet.R index be7843b6c28..28917e03e63 100644 --- a/R/glet.R +++ b/R/glet.R @@ -123,7 +123,7 @@ graphlets.candidate.basis <- function(graph, weights = NULL) { #' gl <- graphlets(g, niter = 1000) #' #' ## Plot graphlets -#' for (i in 1:length(gl$cliques)) { +#' for (i in seq_along(gl$cliques)) { #' sel <- gl$cliques[[i]] #' V(g)$color <- "white" #' V(g)[sel]$color <- "#E495A5" diff --git a/R/operators.R b/R/operators.R index 7b558ebcd61..e16c9378372 100644 --- a/R/operators.R +++ b/R/operators.R @@ -229,7 +229,7 @@ apply_attr_combiner <- function(comb, vals, type) { x <- x[!is.na(x)] apply_one_combiner(comb, x) }) - if (all(vapply(out, length, integer(1)) == 1L)) { + if (all(lengths(out) == 1L)) { unlist(out) } else { out