``Please what could be the possible cause, I've been debugging this code for more than 5hrs now, I need help.`
output$network_plot2 <- renderPlot({
progress <- shiny::Progress$new()
progress$set(message = "Correlation Plot", value = 0.2)
on.exit(progress$close())
progress$set(message = "Creating Pairwise words", value = 0.4)
x <- data.frame(text = sapply(docs(), as.character), stringsAsFactors = FALSE)
x$tweet_nbr <- 1:nrow(x)
tweet_word <- x %>% unnest_tokens(word, text)
tweet_word_cors <- tweet_word %>% group_by(word) %>% filter(n() >= 50) %>%
pairwise_cor(word, tweet_nbr, sort = TRUE, upper = FALSE)
progress$set(detail = "Plotting..", value = 0.8)
set.seed(1234)
tweet_word_cors %>%
filter(correlation > .6) %>%
graph_from_data_frame() %>%
ggraph(layout = "fr") +
geom_edge_link(aes(edge_alpha = correlation, edge_width = correlation), edge_colour = "royalblue") +
geom_node_point(size = 5) +
geom_node_text(aes(label = name), repel = TRUE,
point.padding = unit(0.2, "lines")) +
theme_void()
})