R 找不到函数";getSymbols";使用ShinyApps.io时

R 找不到函数";getSymbols";使用ShinyApps.io时,r,shiny,quantmod,R,Shiny,Quantmod,我刚刚在Rstudio中完成了交易策略的构建,并计划将其部署到ShinyApps.io上。问题来了 首先,总会有这样一条警告信息: Warning messages: 1: In getFromNamespace("checkEncoding", "shiny")(file) : The file "F:\newFinal/server.R" is not encoded in UTF-8. Please convert its encoding to UTF-8 (e.g. use the

我刚刚在Rstudio中完成了交易策略的构建,并计划将其部署到ShinyApps.io上。问题来了

首先,总会有这样一条警告信息:

Warning messages:
1: In getFromNamespace("checkEncoding", "shiny")(file) :
  The file "F:\newFinal/server.R" is not encoded in UTF-8. Please convert its encoding to UTF-8 (e.g. use the menu `File -> Save with Encoding` in RStudio). See http://shiny.rstudio.com/articles/unicode.html for more info. Falling back to the encoding "native.enc".
2: In getFromNamespace("checkEncoding", "shiny")(file) :
  The file "F:\newFinal/server.R" is not encoded in UTF-8. Please convert its encoding to UTF-8 (e.g. use the menu `File -> Save with Encoding` in RStudio). See http://shiny.rstudio.com/articles/unicode.html for more info. Falling back to the encoding "native.enc".
source("helpers.R")
#source("loadfunction.R")
source("main2.R")
#source("main.R")
source("plotperiod.R")
即使我使用UTF-8编码保存了该文件,每次部署应用程序时它仍然会向我显示该警告

另一件事是,我无法在ShinyApps中找到其他文件的来源,如下所示:

Warning messages:
1: In getFromNamespace("checkEncoding", "shiny")(file) :
  The file "F:\newFinal/server.R" is not encoded in UTF-8. Please convert its encoding to UTF-8 (e.g. use the menu `File -> Save with Encoding` in RStudio). See http://shiny.rstudio.com/articles/unicode.html for more info. Falling back to the encoding "native.enc".
2: In getFromNamespace("checkEncoding", "shiny")(file) :
  The file "F:\newFinal/server.R" is not encoded in UTF-8. Please convert its encoding to UTF-8 (e.g. use the menu `File -> Save with Encoding` in RStudio). See http://shiny.rstudio.com/articles/unicode.html for more info. Falling back to the encoding "native.enc".
source("helpers.R")
#source("loadfunction.R")
source("main2.R")
#source("main.R")
source("plotperiod.R")
以下日志显示系统找不到函数“getSymbols”


不确定这是否能解决问题,但为了获取文件源,您需要添加
local
参数并将其设置为
TRUE
,如下所示:

source("helpers.R", local=TRUE)
source("main2.R", local=TRUE)
source("plotperiod.R", local=TRUE)

这对我的事业没有帮助。我仍然得到一个错误。你有相同的问题,作为原来的职位,仍然得到一个错误?如果是,请复制
shinyapps::showLogs()
的输出?