R Language Related: How To Create A Graph By Loading A Matrix Outside
Hi all,
here, a text file containing a matrix, I want to creat a GRAPH through reading it, then how should I do next. I mean, I have absolutely no idea about libraries available and how to exactly use, sorry about that. could you please show me?
M = read.table("path", header=T);
library(igraph);#maybe RBGL
#then .. who can help me here
• 2,574 views
•
link
0 answers
No answers yet.
Log in to answer this question.
So every element of M is an edge? M is square? What kind of edge operations will you need?
So every element of M is an edge? M is square? What kind of graph operations will you need?
You need to read the igraph documentation. As it stands, this is not a bioinformatics question.
Could you please post your tab file ("path")?
thanks for your respone. this code:M = as.matrix(read.table()), it worked well.could you told me how to sparse a matrix. I already load the library SparseM
How is this related to bioinformatics? It seems to be a mere programming task, therefore I would like you to ask on stackoverflow.com. However, your research homework before (otherwise they wil bash you ;) ), e.g. searching the site for "R graph" yields 3646 results, define what kind of graph you want, how your matrix is stored etc.
So, closing this as off-topic and recommend to search http://stackoverflow.com/search?q=R+graph and then put a question there.
non-acrosshybridizing analysis is related to the Graph Theory. anyway, thanks for your message