1 | union(x)
|
x |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | outliers = boxplot(dfnew$freq, plot = FALSE)$out
length = 30
length3 = length*3
df = dfnew[1:30,]
df$from = c(1:30)
df$to = c(2:30, 1)
df = df[, c("from", "to", "word", "freq")]
df2 = df[, c("from", "word", "freq")]
g1 = graph_from_data_frame(d=df, vertices = df2, directed=FALSE)
df3 = dfnew[31:90,]
df3$from = c(31:90)
df3$to = c(32:90, 31)
df3 = df3[, c("from", "to", "word", "freq")]
df4 = df3[, c("from", "word", "freq")]
g2 = graph_from_data_frame(d=df3, vertices = df4, directed=FALSE)
plot(g2, main = "Lombardi Graph",
frame = TRUE,
edge.arrow.size=.5,
vertex.color = "salmon",
vertex.label=df3$word,
vertex.label.color="black",
vertex.size = 7,
vertex.label.font = 2,
edge.curved = .3,
edge.width=2,
layout = l
)
plot(g1,
main = "Lombardi Graph",
frame = TRUE,
edge.arrow.size=.5,
vertex.color = "green",
vertex.label=df$word,
vertex.label.color="darkgreen",
vertex.label.font = 2,
vertex.label.dist = 1,
vertex.label.cex = 1.5,
vertex.size = 9,
edge.curved = .5,
edge.width=2,
add = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.