.getReactiveEnvironment()$ currentContext()出错

时间:2015-04-23 00:37:20

标签: shiny shiny-server

请帮忙, 在此代码附近获取有关反应函数的错误:

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.)

0 个答案:

没有答案