Por lo que envías, number_edges_vertex es un data frame con una sola variable, por lo que da error cuando quieres asignar el nombre de sus columnas como si fuesen 2 variables No sé si te refieres a eso...
-----Mensaje original----- De: R-help-es [mailto:r-help-es-boun...@r-project.org] En nombre de Javier Marcuzzi Enviado el: miércoles, 1 de junio de 2016 0:51 Para: R-help-es@r-project.org Asunto: [R-es] data.frame colname igraph Estimados Tengo un problema, creo que sencillo, pero hay algo que hice mal, coloco el código, básicamente desde igraph se realiza un análisis, y se me ocurre tener un data.frame para ordenar los resultados, pero justo en ese punto aparece un problema. ¿Alguna sugerencia? > version _ platform x86_64-w64-mingw32 arch x86_64 os mingw32 system x86_64, mingw32 status major 3 minor 2.5 year 2016 month 04 day 14 svn rev 70478 language R version.string R version 3.2.5 (2016-04-14) nickname Very, Very Secure Dishes > number_edges_vertex <- as.data.frame(degree(datos.network)) > colnames(number_edges_vertex) <-c('var','grados') Error in `colnames<-`(`*tmp*`, value = c("var", "grados")) : 'names' attribute [2] must be the same length as the vector [1] > str(number_edges_vertex) 'data.frame': 216 obs. of 1 variable: $ degree(datos.network): num 9 10 7 9 7 10 10 12 8 9 ... Javier Rubén Marcuzzi [[alternative HTML version deleted]] _______________________________________________ R-help-es mailing list R-help-es@r-project.org https://stat.ethz.ch/mailman/listinfo/r-help-es _______________________________________________ R-help-es mailing list R-help-es@r-project.org https://stat.ethz.ch/mailman/listinfo/r-help-es