kolaczyk / sand Goto Github PK
View Code? Open in Web Editor NEWStatistical Analysis of Network Data with R, 2nd Edition
Statistical Analysis of Network Data with R, 2nd Edition
> 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!
Hi, I was wondering if the package documentation would be updated. Is still showing to install from github because Cran download is not yet released.
install.packages("devtools")
library(devtools)
install_github("kolaczyk/sand/sand")
I believe the Cran package is available to download with the regular package installing code.
install.packages("sand")
By the way thanks for the excellent book!
install.packages("sand")
Installing package into ‘/Users/XXX/Library/R/3.4/library’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘sand’ is not available (for R version 3.4.3)
Running the chapter 2 code block
g <- graph.formula(1-2, 1-3, 2-3, 2-4, 3-5, 4-5, 4-6, 4-7, 5-6, 6-7)
str(g)
I get the following error
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
Let me know if you need more information, not sure what is standard to submit with an issue.
Thanks!
faction <- get.vertex.attribute(karate, "Faction")
Error in get.vertex.attribute(karate, "Faction") :
get.vertex.attribute requires an argument of class network.
f.colors <- as.character(length(faction))
Error: object 'faction' not found
f.colors[faction == 1] <- "red"
Error in f.colors[faction == 1] <- "red" : object 'f.colors' not found
f.colors[faction == 2] <- "cyan"
Error in f.colors[faction == 2] <- "cyan" : object 'f.colors' not found
plot(f.vec, pch=16, xlab="Actor Number",
abline(0, 0, lwd=2, col="lightgray")
The mixer
package is unavailable at the repository. Does anybody have a work around to execute code chunks from Chapter 6?
Third command line in Chapter 1 gives the following:
install_sand_packages()
Error: With R version 3.5 or greater, install Bioconductor packages using BiocManager; see https://bioconductor.org/install
I have installed latest version of BiocManager but don't know which Bioconductor packages are needed to run the rest of the chapters although those that depend on igraph work perfectly fine.
Hi, Kolaczyk,
First, many thanks for this nice book! Below is the issue:
In CHUNK 14 of Chapter3.R
I tried to run V(fblog.c) immediately after fblog.c <- contract.vertices(fblog, party.nums), then it crashed
I also tried summary(fblog.c), it also crashed
The system mentioned that it's igraph.so that crashes
Although the crash is not in your code, but it's related.
Do you know how to fix that?
Below is my R version:
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status beta
major 3
minor 1.0
year 2014
month 03
day 28
svn rev 65330
language R
version.string R version 3.1.0 beta (2014-03-28 r65330)
nickname Spring Dance
My igraph version is 0.7.1
My sand version is 1.0.2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.