1

my ggplot2 graphs are not plotting out for some reason when i use different classes and functions to run them. however if i manually run the plot graph code directly it runs.

eg ;this is on one script

     sentiment.createGraph = function(list_keyword1){
        *calculate df and meanscore*
            .......................
            .......................
        g = ggplot(df, aes(x=keywords,y=meanscore)) +
        geom_bar(data=df, aes(x=datas, fill=datas),stat="identity") +
        ggtitle("Average Sentiment Score")
        return(g)
     }

so this is the other function script where it runs all of this on the click of a button yes im doing twitterR eg;

list_keyword1 <- searchTwitter(svalue(textBox_keyword1),
                               n=as.numeric(svalue(textBox_numTweet)),
                               cainfo="cacert.pem")
sentiment.createGraph(list_keyword1)  # this is where i call the function above 

calculating and creating the graph however the graph did not plot at all. i need help thanks :/

flodel
  • 87,577
  • 21
  • 185
  • 223
Napmi
  • 521
  • 2
  • 13
  • 32

0 Answers0