igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Could not find function "is" in graph.adjacency


From: Gábor Csárdi
Subject: Re: [igraph] Could not find function "is" in graph.adjacency
Date: Thu, 12 Apr 2012 11:30:36 -0400

The function is() is in the 'methods' package which is normally
automatically loaded. I think it is not loaded if you use Rscript or
'R CMD BATCH', maybe this is causing the problem. If it is not loaded,
then simply load it via 'library(methods)'.

Hopefully this helps.

Gabor

On Thu, Apr 12, 2012 at 11:16 AM, Daigu <address@hidden> wrote:
> I'm a new R/igraph user. While trying out the example from
> http://www.ats.ucla.edu/stat/r/faq/snplot.htm I receive the error "could
> not find function 'is'" after executing the graph.adjacency function.
>
> Now when I look at the code for graph.adjacency, I see:
>
> if (is(adjmatrix, "Matrix")) {
>
> Since I have little experience with R I can not be sure, but shouldn't
> this be:
>
> if (is.matrix(adjmatrix)) {
>
> I've looked for this in the bug lists but it was not mentioned... rather
> doubting it's a bug, but don't have a clue otherwise. Hope you guys can
> help me.
>
> See below for my sessionInfo.
>
> R version 2.12.1 (2010-12-16)
> Platform: x86_64-pc-linux-gnu (64-bit)
>
> locale:
>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
>  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
>  [5] LC_MONETARY=C              LC_MESSAGES=en_US.UTF-8
>  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
>  [9] LC_ADDRESS=C               LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] splines   graphics  stats     utils     grDevices tcltk
> base
>
> other attached packages:
> [1] Rcmdr_1.6-2     car_2.0-7       igraph_0.5.5-4  survival_2.36-2
> [5] nnet_7.3-1      MASS_7.3-9
>
> Also, library() reports:
>
> Packages in library '/home/daigu/R/x86_64-pc-linux-gnu-library/2.12':
>
> igraph                  Network analysis and visualization
> ...
>
>
> Should the package perhaps be in another location?
>
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help



-- 
Gabor Csardi <address@hidden>     MTA KFKI RMKI



reply via email to

[Prev in Thread] Current Thread [Next in Thread]