[R] send out put to file in R

Peter Ehlers ehlers at ucalgary.ca
Wed Jul 14 14:52:14 CEST 2010


On 2010-07-14 4:04, chakri_amateur wrote:
>
> Hi
>
> I am using igraph package in R.
> My goal is to read  a network (in "pajek" format) and decompose the network
> into components.
> In addition, I am also interested in sending this output to to a file.
>
> I am having problem in while writing to a file!
>
> my code looks like this
> g<- read.graph ("F://test.net", "pajek")
> compo<- decompose.graph(g,  mode="weak", max.comps=NA, min.vertices= 20)
> write.graph (compo, "F://new", "pajek")
>
> The error message shown up was -- "Not a Graph Object"
>
> Could any one explain what is the problem here ?

Sure: compo is not an igraph object; it's a list as
class(compo) or reading the help page for decompose.graph
would tell you.

   -Peter Ehlers

>
> Thanks
> chakri



More information about the R-help mailing list