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
P,D3_SF,D3_20,D3_80,D6_SF,D6_20,D6_80,D8_SF,D8_20,D8_80,D10_50
GCSP_PSEFS,1,1,1,1,1,1,1,1,1,1
EFTU_PSEFS,1,1,1,1,0,1,1,1,1,1
PNP_PSEFS,1,1,1,1,1,1,1,1,0,1
EFG_PSEFS,1,1,0,1,1,1,1,1,1,1
RHO_PSEFC,1,1,1,1,1,0,1,1,1,1
EFG_PSEU2,1,1,1,1,1,1,0,1,1,1
SYDND_PSEFS,1,1,1,1,1,1,1,1,1,1
ATPA_PSEFS,1,1,1,1,1,1,1,1,1,1
EFG_PSEPF,1,1,1,1,0,1,1,1,1,1
ATPB_PSEFS,1,1,0,1,1,1,1,1,0,1
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help