[R] Prophet package
Andras Farkas
motyocska at yahoo.com
Sun Mar 19 19:43:55 CET 2017
Dear All
wonder if you could assist with the following
we have:
library(prophet)
library(dplyr)
abc<-c(0.3684693,0.4938679, 0.4429201,0.452598,0.4301452,0.4315169,
0.447026,0.496179,0.4045693,0.398533, 0.3551111,0.431079,0.4063136,0.4120126,0.5210375,0.402897,0.4466131,0.5005669,0.5014164,0.5042271,0.5498575,0.6014215,0.4415863,0.4377443,0.4316092,0.4156757,0.3517915,0.3669508,0.3899471,0.3964143,0.4001074,0.3851003,0.4222451,0.375324,0.3652045,0.3376978
,0.383012,0.3763665,0.3550609,0.2958678,0.3726571,0.3442298
#,0.3403275,0.2973978
#, 0.4,0.4,0.4, 0.4,0.4,0.4, 0.4,0.4,0.4
)
df<-data.frame(ds = seq(as.Date('2013-08-01'), as.Date('2017-01-01'), by = 'm'),abc)
names(df)<-c("ds","y")
m<-prophet(df,yearly.seasonality = TRUE)
future <- make_future_dataframe(m, periods = 730)
forecast <- predict(m, future)
plot(m, forecast)
points(x=as.Date('2017-02-01'),y=0.5)
results in error message :
Error in plot.xy(xy.coords(x, y), type = type, ...) :
plot.new has not been called yet
would you have a solution to plot the point on the plot?
appreiate the help,
Andras Farkas,
More information about the R-help
mailing list