Been reading Tidytext Mining with R by Julia Silge and David Robinson - https://www.tidytextmining.com/nasa.html - and stumped on how to have the node size adjust in relation to frequency (n). Tried the following code...
library(widyr)
set.seed(1234)
title_word_pairs %>%
filter(n >= 250) %>%
graph_from_data_frame() %>%
ggraph(layout = "fr") +
geom_edge_link(aes(edge_alpha = n, edge_width = n), edge_colour =
"royalblue") +
geom_node_point(aes(size = n)) + scale_size(range = c(2,10)) +
geom_node_text(aes(label = name), repel = TRUE,
point.padding = unit(0.2, "lines")) +
theme_void()
...and receive this error...
Error: Column `size` must be a 1d atomic vector or a list
Call `rlang::last_error()` to see a backtrace
Any thoughts or ideas would be appreciated.