请帮忙, 在此代码附近获取有关反应函数的错误:
stockstxtclosure <- reactive({
query <- parseQueryString(clientData$url_search)
stockstweets = searchTwitter(query[["ticker"]], n=10, lang="en")
stockstxt = sapply(stockstweets, function(x) x$getText())
return (stockstxt)
})
stockstxt = stockstxtclosure()
stockstxt = gsub("(RT|via)((?:\\b\\W*@\\w+)+)", "", stockstxt)
错误是:
Error in .getReactiveEnvironment()$currentContext() : Operation not allowed without an active reactive context. (You tried to do something that can only be done from inside a reactive expression or observer.)