nodes

R: Modifying Graphs

拜拜、爱过 提交于 2020-12-12 09:00:34
问题 I posted a comment/reply to another stackoverflow post over here : R: Understanding Graph relating to graphs in R. If you create some data corresponding to movies and actors (in which movies can not be connected to other movies directly, and actors can not be connected to other actors directly), you write some R code to check if your graph is bipartite: library(igraph) film_data <- data.frame( "movie" = c("movie_1", "movie_1", "movie_1", "movie_2", "movie_2", "movie_2", "movie_3", "movie_3",

R: creating a 'statnet' network with node attributes

限于喜欢 提交于 2020-11-29 11:12:00
问题 I am following the examples over here on using the "statnet" library in http://personal.psu.edu/drh20/papers/v24i09.pdf. The first example shows how to inspect a statnet network object in R: library(statnet) library(network) data("faux.magnolia.high") fmh <- faux.magnolia.high summary(fmh) In the above example, it seems here that the statnet network in this example already has "node attributes". Using the statnet library, does anyone know if there is a way to directly create a network with

R: creating a 'statnet' network with node attributes

人走茶凉 提交于 2020-11-29 11:08:23
问题 I am following the examples over here on using the "statnet" library in http://personal.psu.edu/drh20/papers/v24i09.pdf. The first example shows how to inspect a statnet network object in R: library(statnet) library(network) data("faux.magnolia.high") fmh <- faux.magnolia.high summary(fmh) In the above example, it seems here that the statnet network in this example already has "node attributes". Using the statnet library, does anyone know if there is a way to directly create a network with

Formatting Graphs in R

我的未来我决定 提交于 2020-11-29 09:52:05
问题 I am trying to figure out how to easily access and manipulate graphs created in R. If I start with the following data. I create a graph, run some graph clustering and then plot the first cluster: #libraries library(igraph) library(igraphdata) data(karate) #cluster cfg <- cluster_fast_greedy(karate) plot(cfg, karate) cfg IGRAPH clustering fast greedy, groups: 3, mod: 0.43 + groups: $`1` [1] "Actor 9" "Actor 10" "Actor 15" "Actor 16" "Actor 19" "Actor 21" "Actor 23" "Actor 24" "Actor 25" "Actor

(R language) Understanding what is a “weighted” graph

泄露秘密 提交于 2020-11-24 17:19:03
问题 I am using R and the igraph library to learn about network graph data. In particular, I am trying to understand the concept of a "weighted graph" - from what I have read, the "weights" are generally associated with the "Edges" in the graph. But can the "weights" ever be associated with the "nodes"? (sometimes, I see that "nodes" are also referred to as "vertexes") Suppose I have two datasets : one for the nodes and one for the edges. library(igraph) library(visNetwork) Nodes <-data.frame(

(R language) Understanding what is a “weighted” graph

瘦欲@ 提交于 2020-11-24 17:17:53
问题 I am using R and the igraph library to learn about network graph data. In particular, I am trying to understand the concept of a "weighted graph" - from what I have read, the "weights" are generally associated with the "Edges" in the graph. But can the "weights" ever be associated with the "nodes"? (sometimes, I see that "nodes" are also referred to as "vertexes") Suppose I have two datasets : one for the nodes and one for the edges. library(igraph) library(visNetwork) Nodes <-data.frame(