-
-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
inline igraph_opt() and igraph_options()
- Loading branch information
Showing
4 changed files
with
78 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,39 @@ | ||
|
||
#' Parameters for the igraph package | ||
#' | ||
#' @description | ||
#' `r lifecycle::badge("deprecated")` | ||
#' | ||
#' `igraph.options()` was renamed to `igraph_options()` to create a more | ||
#' consistent API. | ||
#' @inheritParams igraph_options | ||
#' @keywords internal | ||
#' @export | ||
igraph.options <- function(...) { # nocov start | ||
lifecycle::deprecate_soft("2.0.0", "igraph.options()", "igraph_options()") | ||
igraph_i_options(...) | ||
} # nocov end | ||
|
||
#' Parameters for the igraph package | ||
#' | ||
#' @description | ||
#' `r lifecycle::badge("deprecated")` | ||
#' | ||
#' `getIgraphOpt()` was renamed to `igraph_opt()` to create a more | ||
#' consistent API. | ||
#' @inheritParams igraph_opt | ||
#' @keywords internal | ||
#' @export | ||
getIgraphOpt <- function(x, default = NULL) { # nocov start | ||
lifecycle::deprecate_soft("2.0.0", "getIgraphOpt()", "igraph_opt()") | ||
|
||
if (missing(default)) { | ||
get_config(paste0("igraph::", x), .igraph.pars[[x]]) | ||
} else { | ||
get_config(paste0("igraph::", x), default) | ||
} | ||
} # nocov end | ||
|
||
# IGraph R package | ||
# Copyright (C) 2005-2012 Gabor Csardi <[email protected]> | ||
# 334 Harvard street, Cambridge, MA 02139 USA | ||
|
@@ -126,7 +161,7 @@ igraph.pars.callbacks <- list("verbose" = igraph.pars.set.verbose) | |
#' [attribute.combination()] for details on this.} | ||
#' } | ||
#' | ||
#' @aliases igraph.options igraph_options getIgraphOpt igraph_opt | ||
#' @aliases igraph_options igraph_opt | ||
#' @param \dots A list may be given as the only argument, or any number of | ||
#' arguments may be in the `name=value` form, or no argument at all may be | ||
#' given. See the Value and Details sections for explanation. | ||
|
@@ -247,7 +282,3 @@ with_igraph_opt <- function(options, code) { | |
old <- igraph_options(options) | ||
force(code) | ||
} | ||
#' @export getIgraphOpt | ||
deprecated("getIgraphOpt", igraph_opt) | ||
#' @export igraph.options | ||
deprecated("igraph.options", igraph_options) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.