【发布时间】:2016-04-25 13:26:43
【问题描述】:
我正在尝试在 1 年内 plot PNB(Nifty 指数)的股票价格(时间序列),以研究这些模式。附CSV格式的股票价格数据。
但是当我尝试使用zoo (xts) package 转换来自CSV 文件的这些数据的类时,
注意:xts 是 zoo 包的子集。
d<-xts(f$Close.Price,order.by=as.Date(f$Date),format="%m/%d/%y")
charToDate(x) 中的错误:character string is not in a standard unambiguous format
where f is the dataframe which is the reading the .csv file
我也尝试使用以下命令使用日期变量,并给出以下错误,
s
我正在获取日期的 NA。 换句话说,我无法将 f$Date 类转换为“ts”类。 请帮我把数据转换成正确的格式。
【问题讨论】: