我的验证码未以html格式显示

时间:2018-07-02 10:31:46

标签: html

好了,我得到了这个代码

library(tidyquant)
library(timetk)

raw_data <- tibble(Date = c(as.Date("2011-07-01"), as.Date("2011-08-01"),
                   as.Date("2011-09-01"), as.Date("2011-10-01"),
                   as.Date("2011-11-01"), as.Date("2011-12-01"),
                   as.Date("2012-01-01"), as.Date("2012-02-01")),
                  Value = c(1,4,1,4,1,4,1,4))
                  # And so on, till 2018-05-01 and with reasonable values

tk_ts(raw_data, select = Value, start = 2011, frequency = 12)
# Leads to:
# 
#      Jan Feb Mar Apr May Jun Jul Aug
# 2011   1   4   1   4   1   4   1   4
#
# which is bad since my first date is 2011-07-01 not 2011-01-01.

xts_data <- xts(raw_data$Value, order.by = raw_data$Date, frequency = 12)
# xts_data Leads to, which is fine:
# 
# [,1]
# 2011-07-01    1
# 2011-08-01    4
# 2011-09-01    1
# 2011-10-01    4
# 2011-11-01    1
# 2011-12-01    4
# 2012-01-01    1
# 2012-02-01    4

as.ts(xts_data, start = start(xts_data), end = end(xts_data))
# Leads to:
# 
# Time Series:
# Start = 15156 
# End = 15371 
# Frequency = 1 
# [1] 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1
# [52] 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4
# [103] 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1
# [154] 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4
# [205] 1 4 1 4 1 4 1 4 1 4 1 4
#
# Which is totaly bad since there are more than the original 8 values.

as.ts(xts_data, start = start(xts_data))
# Leads to:
# 
# Time Series:
#   Start = 15156 
# End = 15163 
# Frequency = 1 
# [1] 1 4 1 4 1 4 1 4
#
# Which is bad since the Frequency is off
#  and I need it to be ok for the decompose.

as.ts(xts_data, start = start(xts_data), end = end(xts_data), frequency = 12)
# Leads to:
# 
# Error in ts(coredata(x), frequency = frequency(x), ...) : 
#   formal argument "frequency" matched by multiple actual arguments

attr(xts_data, 'frequency') <- 12
as.ts(xts_data, start = start(xts_data))
# Leads to:
# 
# Jan Feb Mar Apr May Jun Jul Aug
# 15156   1   4   1   4   1   4   1   4
#
# Which is as bad as the first example

但是它没有像我没有添加验证码的形式那样加载..任何解决方案?

1 个答案:

答案 0 :(得分:-1)

您可以提供更多信息吗?是否在开头部分添加了recaptcha sdk?您是否使用了正确的密钥?还要检查是否在“域”列表中正确添加了域。