@@ -952,9 +952,8 @@ eigen_defaults <- function() {
952952# ' @param graph Graph to be analyzed.
953953# ' @param directed Logical scalar, whether to consider direction of the edges
954954# ' in directed graphs. It is ignored for undirected graphs.
955- # ' @param scale Logical scalar, whether to scale the result to have a maximum
956- # ' score of one. If no scaling is used then the result vector has unit length
957- # ' in the Euclidean norm.
955+ # ' @param scale `lifecycle::badge("deprecated")` Normalization will always take
956+ # ' place.
958957# ' @param weights A numerical vector or `NULL`. This argument can be used
959958# ' to give edge weights for calculating the weighted eigenvector centrality of
960959# ' vertices. If this is `NULL` and the graph has a `weight` edge
@@ -990,7 +989,7 @@ eigen_defaults <- function() {
990989# ' @cdocs igraph_eigenvector_centrality
991990eigen_centrality <- function (graph ,
992991 directed = FALSE ,
993- scale = TRUE ,
992+ scale = deprecated() ,
994993 weights = NULL ,
995994 options = arpack_defaults()) {
996995
@@ -1003,9 +1002,24 @@ eigen_centrality <- function(graph,
10031002 options <- options()
10041003 }
10051004
1005+ if (lifecycle :: is_present(scale )) {
1006+ if (scale ) {
1007+ lifecycle :: deprecate_soft(
1008+ " 2.1.1" ,
1009+ " eigen_centrality(scale)" ,
1010+ details = " eigen_centrality() will always behave as if scale=TRUE were used."
1011+ )
1012+ } else {
1013+ lifecycle :: deprecate_warn(
1014+ " 2.1.1" ,
1015+ " eigen_centrality(scale = 'always as if TRUE')" ,
1016+ details = " Normalization is always performed" )
1017+ }
1018+ }
1019+
10061020 eigenvector_centrality_impl(graph = graph ,
10071021 directed = directed ,
1008- scale = scale ,
1022+ scale = TRUE ,
10091023 weights = weights ,
10101024 options = options )
10111025}
0 commit comments