Tamas is correct. plot_network is a phyloseq command. Phyloseq has lots of good material on their github pages. If you can’t find the answer there browse through the issues or post a new one.
vsh Vicki Stover Hertzberg, Ph.D., FASA, P.Stat. Professor and Director Center for Data Science Nell Hodgson Woodruff School of Nursing Emory University Atlanta, GA 30322 Office: 404-727-1881 email: [email protected]<mailto:[email protected]> From: igraph-help <[email protected]> on behalf of Tamas Nepusz <[email protected]> Reply-To: Help for igraph users <[email protected]> Date: Friday, June 9, 2017 at 3:50 PM To: Help for igraph users <[email protected]> Subject: Re: [igraph] Error in igraph trying to plot a co-ocurrence network Hi, The plot_network() function is not part of igraph so we cannot help here. Please contact the authors of the package that implements the plot_network() function for help -- I suspect that the function is part of the phyloseq package. T. On Fri, Jun 9, 2017 at 1:29 PM, Miguel Angel Fernández Martínez <[email protected]<mailto:[email protected]>> wrote: Hi there! I am very very new at igraph package and just a little more than a rookie in R, so maybe my questions are a bit trivial. I apologize for that. I am triying to run a script that combines the package 'Spiec-Easi' with 'igraph' to perform a netwowork analysis and its plot. I have encountered some problems with my data format, but most of them has been overcome. However, I am now facing one that I cannot solve by myself. I copy my whole script and I attach the data in .csv file format just in case you want to have a look at it: library(devtools) library(SpiecEasi) library(igraph) library(phyloseq) tabla <- read.csv("tabla_prueba.txt") rownames(tabla) <- tabla[,1] tabla <- tabla[,-1] tabla <- t(tabla) se.tabla <- spiec.easi(tabla, method='mb', lambda.min.ratio=1e-2, nlambda=20, icov.select.params=list(rep.num=20)) se.tabla <- unlist(se.tabla) ig.tabla <- adj2igraph(se.tabla$refit) plot_network(ig.tabla, tabla) Everything seems to work properly until the very last command, when I get the following: Error in `$<-.data.frame`(`*tmp*`, "id", value = c(1L, 0L)) : replacement has 2 rows, data has 0 Although it seems to be a very common issue, I have not found any viable solution on Internet. Can anyone help with this problem? Thanks a lot! -- Miguel Ángel Fernández Martínez PostDoctoral Researcher Dept. Evolución Molecular, Despacho 10 Tlf.: 91 520 64 33 - Ext. 5415 Centro de Astrobiología (CAB), INTA-CSIC Madrid, Spain _______________________________________________ igraph-help mailing list [email protected]<mailto:[email protected]> https://lists.nongnu.org/mailman/listinfo/igraph-help ________________________________ This e-mail message (including any attachments) is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message (including any attachments) is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail message and destroy all copies of the original message (including attachments).
_______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
