# NOT RUN {
#make edge.list
df <- data.frame(
id1 = sample(x = 1:20, size = 100, replace = TRUE),
id2 = sample(x = 1:10, size = 100, replace = TRUE),
weight = sample(x = 1:10, size = 100, replace = TRUE)
)
#convert to sparsematrix
sparsematrix_from_edgelist(data = df)
# }
Run the code above in your browser using DataLab