Error in menu: menu() cannot be used non-interactively

Please help out shiny deployment

emotion_score <- reactive({
    # emotion_df <- emotion_df_final %>% filter(topic == input$topic_selector)
    # x <- as.data.frame(colSums(emotion_df[,1:10]))
    # x <- data.frame(names = row.names(x), x)
    # names(x) <- c("emotion", "score")
    # x[1:8,]
    progress <- shiny::Progress$new()
    progress$set(message = "Getting Emotions", value = 0.2)
    on.exit(progress$close())
    
    x <- data.frame(tweet_nbr = 1:length(cleaned_tweets()), clean_tweet = cleaned_tweets())
    x$clean_tweet <- as.character(x$clean_tweet)
    
    df <- x  %>% unnest_tokens(output = word, input = clean_tweet, token = "words")
    df <- df %>% inner_join(get_sentiments("nrc"))
    progress$set(value = 0.8, detail = paste("Collating.."))
    df <- df %>% group_by(sentiment) %>% summarise(score = n())
    names(df) <- c("emotion", "score")
    df[c(1:5,8:10),]
  })
1 Like

Does the word menu appear anywhere in any of your code?

Yes it does. I think R is not automatically pulling the Afinn data. How do I do that, I have tidytext and text data loaded

I recommend you look this over.

Shiny debugging and reprex guide

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.