[BioC] Rgraphviz: fail to plot
Martin Morgan
mtmorgan at fhcrc.org
Thu Jan 26 21:23:33 CET 2012
On 01/25/2012 10:30 AM, H??vard Rue [guest] wrote:
>
> I upgraded Rgraphviz, and now it fails to plot even the first example,
>
>> set.seed(123)
>> V<- letters[1:10]
>> M<- 1:4
>> g1<- randomGraph(V, M, 0.2)
>> plot(g1)
> Error in as.double(y) :
> cannot coerce type 'S4' to vector of type 'double'
>
> seems like no 'plot method' is defined for the graph; but this sounds like something else is going on.
>
> Anyone with a similar problem?
>
> Best
> H
>
> -- output of sessionInfo():
>
> $ R --vanilla
>
> R version 2.14.1 (2011-12-22)
> Copyright (C) 2011 The R Foundation for Statistical Computing
> ISBN 3-900051-07-0
> Platform: x86_64-redhat-linux-gnu (64-bit)
>
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
>
> Natural language support but running in an English locale
>
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
>
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
>
>> library(Rgraphviz)
> Loading required package: graph
> Loading required package: grid
>> set.seed(123)
>> V<- letters[1:10]
>> M<- 1:4
>>
>>
>> ###################################################
>> ### code chunk number 2: createGraph2
>> ###################################################
>> g1<- randomGraph(V, M, 0.2)
>> plot(g1)
> Error in as.double(y) :
> cannot coerce type 'S4' to vector of type 'double'
>> sessionInfo()
> R version 2.14.1 (2011-12-22)
> Platform: x86_64-redhat-linux-gnu (64-bit)
>
> locale:
> [1] LC_CTYPE=en_GB.utf8 LC_NUMERIC=C
> [3] LC_TIME=en_DK.utf8 LC_COLLATE=en_GB.utf8
> [5] LC_MONETARY=en_GB.utf8 LC_MESSAGES=en_GB.utf8
> [7] LC_PAPER=C LC_NAME=C
> [9] LC_ADDRESS=C LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_GB.utf8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] grid stats graphics grDevices utils datasets methods
> [8] base
>
> other attached packages:
> [1] Rgraphviz_1.32.0 graph_1.32.0
>
> loaded via a namespace (and not attached):
> [1] lattice_0.20-0 Matrix_1.0-2 pixmap_0.4-11 sp_0.9-91 tools_2.14.1
This sessionInfo() isn't consistent with R --vanilla followed by
library(Rgraphviz) -- lattice, Matrix, pixmap, sp would not be attached.
You're right (in a subsequent message) that the problem looks like
method dispatch; Rgraphviz::plot(g1) might get what you want but it
would be good to have a complete and consistent script / sessionInfo to
understand the problem.
Martin
>>
>
>
> --
> Sent via the guest posting facility at bioconductor.org.
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
--
Computational Biology
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109
Location: M1-B861
Telephone: 206 667-2793
More information about the Bioconductor
mailing list