R-光泽找不到“;货柜;
我正在尝试创建一个基本的金融应用程序,它以公司的股票代码作为输入,并利用quantmod包中的各种功能返回某些信息(损益表、现金流等)。我遇到了一个错误,上面写着“错误:找不到函数”容器。我知道大多数时候,闪亮的错误都是由于没有一个结束括号,但情况似乎不是这样,我以前玩的时候也没有遇到过这个错误。感谢您的帮助 用户界面 服务器.RR-光泽找不到“;货柜;,r,shiny,quantmod,financial,R,Shiny,Quantmod,Financial,我正在尝试创建一个基本的金融应用程序,它以公司的股票代码作为输入,并利用quantmod包中的各种功能返回某些信息(损益表、现金流等)。我遇到了一个错误,上面写着“错误:找不到函数”容器。我知道大多数时候,闪亮的错误都是由于没有一个结束括号,但情况似乎不是这样,我以前玩的时候也没有遇到过这个错误。感谢您的帮助 用户界面 服务器.R library(shiny) shinyServer(function(input, output) { library(quantmod)
library(shiny)
shinyServer(function(input, output) {
library(quantmod)
change_ticker <- reactive(function() {
ticker <- input$ticker
adj_ticker <- getFin(ticker)
financial <- get(adj_ticker)
financial
})
output$last_price <- renderTable(
getQuote(ticker)
)
output$annual_bs <- renderText(
viewFinancials(financial, type = "BS", period = "A")
)
output$annual_cf <- renderText(
viewFinancials(financial, type = "CF", period = "A")
)
output$annual_is <- renderText(
viewFinancials(financial, type = "IS", period = "A")
)
output$quarter_bs <- renderText(
viewFinancials(financial, type = "BS", period = "Q")
)
output$quarter_cf <- renderText(
viewFinancials(financial, type = "CF", period = "Q")
)
output$quarter_is <- renderText(
viewFinancials(financial, type = "IS", period = "Q")
)
})
库(闪亮)
shinyServer(功能(输入、输出){
图书馆(quantmod)
change_tickers没有标签,因此这不起作用:
textOutput("last_price",
"Last Traded Price"),
textOutput("NCAVPS",
"Net Current Asset Value per Share")
第二个参数是容器
,一个生成HTML容器的函数
div(
tags$b("Last Traded Price"),
textOutput("last_price")
)
div(
tags$b("Last Traded Price"),
textOutput("last_price")
)