Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in str.igraph for code 2.4 - Can't proceed using N #6

Open
Gooseus opened this issue Apr 11, 2018 · 1 comment
Open

Error in str.igraph for code 2.4 - Can't proceed using N #6

Gooseus opened this issue Apr 11, 2018 · 1 comment

Comments

@Gooseus
Copy link

Gooseus commented Apr 11, 2018

> N <<< 2.4 str(g) Error in adjacent_vertices(x, i, mode = if (directed) "out" else "all") : At iterators.c:759 : Cannot create iterator, invalid vertex id, Invalid vertex id

Searching for this error turns up this StackOverflow post - https://stackoverflow.com/questions/46137227/r-str-gives-unusual-return-using-igraph

It seems that as of igraph 1.1.1 that str() is defunct and you need to use print_all(g) instead of str(g), which gives the correct output for 2.4.

However, there doesn't seem to be a way to skip over a code section within a chapter using N, so the rest of the code needs to be manually entered.

I would recommend updating the code for 2.4 and also implementing a function for skipping a code section or jumping directly to a code section.

Thanks!

@wejo24
Copy link

wejo24 commented Jun 13, 2018

@Gooseus Thanks for the comment! I have come to the same issue with the book. But I have still got a question to @gaborcsardi , i.e:
Is the print_all() command similar in all sense to str() command? I have noticed that with the print_all() command, in the output, I have got a random number (ex: e7545b2) just after the IGRAPH. What does it stand for? Is it of any uses?

Thank you for those precisions and thanks for the book, it is very interesting!

Kind regards,

Joachim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants