【发布时间】:2015-03-13 09:49:08
【问题描述】:
我有这样的维基百科页面浏览数据
library(wikipediatrend)
views <-wp_trend(page = "European debt crisis",from = "2010-01-01",to = "2014-12-31",lang = "en",friendly = TRUE,requestFrom = "wp.trend.tester at wptt.wptt",userAgent = TRUE)
date count
2010-01-01 128
2010-01-02 142
我有 S&P500 的数据
library(quantmod)
startDate = as.Date("2010-01-01")
endDate = as.Date("2014-12-31")
getSymbols("^GSPC", src = "yahoo", from = startDate, to = endDate)
Date Open High Low Close Volume
2010-01-04 1116.56 1133.87 1116.56 1132.99 3991400000
2010-01-05 1132.66 1136.63 1129.66 1136.52 2491020000
现在我只想提取交易发生时维基百科页面的那些日子,即不包括周末和节假日以及飓风桑迪等非自然关闭的日子等。提取这些值的最简单方法是什么
【问题讨论】:
-
你能再分享一点源代码吗?