Skip to content
Prev 369854 / 398503 Next

error for using igraph library: 'edges' must be numeric or character

They are probably factors in a data frame. Use str() on your data (a
data frame?) to find out.

If you have not already done so, please spend some time with an R
tutorial or two to learn about factors and, in particular how
read.csv(), read.table(), etc. will cause this to happen, how you can
prevent it, and how to use ?as.character to convert from factor to
character.

A search (e.g. at rseek.org) on something like "R factor or character"
will also probably bring up relevant info.

Cheers,
Bert



Cheers,
Bert
Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Sun, Jun 18, 2017 at 12:39 AM, Zahra Tofighi <tofighizahra at gmail.com> wrote: