Warning message: 'is.R' is deprecated

I am running a pc() model, implemented in the pcalg package. Then, I am getting a graph from the saved pc.object, and plot it using igraph:

gr = graph_from_graphnel(pc.object@graph)
plot.igraph(gr)

The plot.igraph() function returns the warning message: 'is.R' is deprecated. Can you help me understand how can I fix this? Thanks!

Please test this with the latest version of igraph. If it still happens, provide a minimal reproducible example, along with the output of sessionInfo().

The warning message does not occur once I’ve upgraded R and all the packages. Thanks.

For completeness, here is the minimal code example:


library(MASS)
library(pcalg)
library(igraph)

# Some variance-covariance
Corrs <- matrix(c(1.0,0.6,0.7,0.5,0.6,1.0,0.5,0.6,0.7,0.5,1.0,0.7,0.5,0.6,0.7,1.0), 4, 4)
SDs <- c(1.0,0.5,2.0,1.0)
Covs <- SDs %*% t(SDs) * Corrs

dat = as.data.frame(mvrnorm(100, mu=c(0,0,0,0), Sigma=Covs))

n = nrow(dat)
V = colnames(dat) # node names
pc1 = pc(suffStat=list(C=cor(dat), n=n),
             indepTest=gaussCItest, # indep.test: partial correlations
             alpha=0.05, labels=V, u2pd='retry')

gr = graph_from_graphnel(pc1@graph)

plot.igraph(gr, layout=layout_in_circle,
    vertex.label=V, vertex.shape='circle', vertex.size=30,
    vertex.label.cex=0.55, vertex.label.color='black',
    edge.arrow.size=0.6)

Output from sessionInfo() is:

R version 4.4.1 (2024-06-14)
Platform: x86_64-apple-darwin20
Running under: macOS Sonoma 14.5

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/lib/libRblas.0.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.0

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

time zone: Europe/London
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] igraph_2.0.3 pcalg_2.7-11 MASS_7.3-61 

loaded via a namespace (and not attached):
 [1] graph_1.82.0        DEoptimR_1.1-3      clue_0.3-65        
 [4] magrittr_2.0.3      fastICA_1.2-4       abind_1.4-5        
 [7] BiocGenerics_0.50.0 pkgconfig_2.0.3     stats4_4.4.1       
[10] lifecycle_1.0.4     cli_3.6.3           sfsmisc_1.1-18     
[13] ggm_2.5.1           corpcor_1.6.10      robustbase_0.99-3  
[16] compiler_4.4.1      RBGL_1.80.0         tools_4.4.1        
[19] cluster_2.1.6       bdsmatrix_1.3-7     Rcpp_1.0.13        
[22] BiocManager_1.30.23 rlang_1.1.4        
1 Like