楼主: Zhonghongboy
3279 0

[问答] 求助帖-RStudio运行过程出现读取错误 [推广有奖]

  • 0关注
  • 0粉丝

小学生

7%

还不是VIP/贵宾

-

威望
0
论坛币
0 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
163 点
帖子
2
精华
0
在线时间
6 小时
注册时间
2017-10-10
最后登录
2020-9-28

楼主
Zhonghongboy 发表于 2017-10-11 19:17:45 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
请问最后红色语句显示的是什么错误,怎样解决??




> library(quantmod)
载入需要的程辑包:xts
载入需要的程辑包:zoo

载入程辑包:‘zoo’

The following objects are masked from ‘package:base’:

    as.Date, as.Date.numeric

载入需要的程辑包:TTR
WARNING: You are configured to use the CRAN mirror at https://cran.rstudio.com/. This mirror supports secure (HTTPS) downloads however your system is unable to communicate securely with the server (possibly due to out of date certificate files on your system). Falling back to using insecure URL for this mirror.

To learn more and/or disable this warning message see the "Use secure download method for HTTP" option in Tools -> Global Options -> Packages.
Version 0.4-0 included new data defaults. See ?getSymbols.
Learn from a quantmod author: https://www.datacamp.com/courses ... financial-data-in-r
> library(PerformanceAnalytics)

Package PerformanceAnalytics (1.4.3541) loaded.
Copyright (c) 2004-2014 Peter Carl and Brian G. Peterson, GPL-2 | GPL-3
http://r-forge.r-project.org/projects/returnanalytics/


载入程辑包:‘PerformanceAnalytics’

The following object is masked from ‘package:graphics’:

    legend

> setSymbolLookup(WK=list(name='000002.sz',src='yahoo'))
> getSymbols("WK")
‘getSymbols’ currently uses auto.assign=TRUE by default, but will
use auto.assign=FALSE in 0.5-0. You will still be able to use
‘loadSymbols’ to automatically load data. getOption("getSymbols.env")
and getOption("getSymbols.auto.assign") will still be checked for
alternate defaults.

This message is shown once per session and may be disabled by setting
options("getSymbols.warning4.0"=FALSE). See ?getSymbols for details.

WARNING: There have been significant changes to Yahoo Finance data.
Please see the Warning section of ‘?getSymbols.yahoo’ for details.

This message is shown once per session and may be disabled by setting
options("getSymbols.yahoo.warning"=FALSE).
[1] "WK"
Warning message:
000002.sz contains missing values. Some functions will not work if objects contain missing values in the middle of the series. Consider using na.omit(), na.approx(), na.fill(), etc to remove or replace them.
> sym.vec<-c("WK","^VIX")
> getSymbols(sym.vec,from="2016-07-01",to="2017-10-10")
[1] "WK"  "VIX"
> WK<-WK[,"000002.SZ.Adjusted",drop=F]
> WK.logret=CalculateReturns(WK,method="log")
> WK.logret[1]
           000002.SZ.Adjusted
2016-07-01                 NA
> WK.logret[1]-0.0
           000002.SZ.Adjusted
2016-07-01                 NA
> par(mfrow=c(3,1))
> plot(WK)
Error in gzfile(file, "wb") : cannot open the connection
In addition: Warning message:
In gzfile(file, "wb") :
  cannot open compressed file 'C:/Users/???/AppData/Local/Temp/Rtmp4iR75X/rs-graphics-59821227-830a-44f5-a58d-0d653f8da2fb/1db66f22-137a-40e2-aec1-b3406b8d740d.snapshot', probable reason 'Invalid argument'
Graphics error: Plot rendering error
> plot(WK.logret)
Error in gzfile(file, "wb") : cannot open the connection
In addition: Warning message:
In gzfile(file, "wb") :
  cannot open compressed file 'C:/Users/???/AppData/Local/Temp/Rtmp4iR75X/rs-graphics-59821227-830a-44f5-a58d-0d653f8da2fb/13a2bf65-c4ac-4c64-88ae-7d1c89ee951c.snapshot', probable reason 'Invalid argument'
Graphics error: Plot rendering error

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:RStudio

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-30 21:24