df1 \<- tbl(sc ,"databricks.tablename")
g \<- graph_from_data_frame(df1, directed = TRUE, vertices = NULL) # Directed Igraph creation
is_weighted(g) #Check for Weight
pagerank \<- page.rank(g ,algo="power")$vector # Page Rank Algorithm
Error message:
Error in page.rank(g, algo = "power") :
At core/centrality/centrality_other.c:1321 : Unknown PageRank algorithm, Invalid value
Some(<code> Error in page.rank(g, algo = "power"): At core/centrality/centrality_other.c:1321 : Unknown PageRank algorithm, Invalid value </code>)
Error in page.rank(g, algo = "power"): At core/centrality/centrality_other.c:1321 : Unknown PageRank algorithm, Invalid value
I am using igraph V 1.3.0 (Updated on April 1 2022)
I am running this code in a databricks notebook. I have installed required libraries. This piece of code was working until last month (March 31st).
install.packages(c("igraph","magrittr","miniCRAN","doSNOW"))
library(miniCRAN)
library(igraph)
library(magrittr)
install.packages(c("RPostgreSQL","DescTools","xgboost","caTools","e1071"))
library(RPostgreSQL)
library(SparkR)
library(sparklyr)
library(dplyr)
library(dbplyr)
library(magrittr)
library(readxl)
library(data.table)
library(RPostgreSQL)
library(DescTools)
library(parallel)
library(readr)
library(tidyr)
sc \<- spark_connect(method = "databricks")
I am aware of the new version released on 1st of April 2022 https://cran.r-project.org/web/packages/igraph/index.html
The
"power"method was already deprecated, and it has been removed in igraph 1.3.0, as is made clear in the changelog: https://cran.r-project.org/web/packages/igraph/news/news.html Use one of the other two methods, as they are superior. Alternatively, do not specify a method and go with the default. All methods should give the same result—if not, that's a bug.Update: Now I see that the documentation still mentions the
"power"method in 1.3.0. This will be corrected in 1.3.1.