from_to(DATA, 'person')
from_to_summarize(DATA, 'person')
from_to_summarize(DATA, 'person', c('sex', 'adult'))
if (FALSE) {
if (!require("pacman")) install.packages("pacman"); library(pacman)
p_load(dplyr, geomnet, qdap, stringi, scales)
p_load_current_gh('trinker/textsahpe')
dat <- from_to_summarize(DATA, 'person', c('sex', 'adult')) %>%
mutate(words = rescale(word.count, c(.5, 1.5)))
dat %>%
ggplot(aes(from_id = from, to_id = to)) +
geom_net(
aes(linewidth = words),
layout.alg = "fruchtermanreingold",
directed = TRUE,
labelon = TRUE,
size = 1,
labelcolour = 'black',
ecolour = "grey70",
arrowsize = 1,
curvature = .1
) +
theme_net() +
xlim(c(-0.05, 1.05))
}
Run the code above in your browser using DataLab