浏览代码

R package doc update for dygraph addition

Ben Letham 7 年之前
父节点
当前提交
07138f7deb

+ 1 - 0
R/NAMESPACE

@@ -5,6 +5,7 @@ S3method(predict,prophet)
 export(add_regressor)
 export(add_regressor)
 export(add_seasonality)
 export(add_seasonality)
 export(cross_validation)
 export(cross_validation)
+export(dyplot.prophet)
 export(fit.prophet)
 export(fit.prophet)
 export(layer_changepoints)
 export(layer_changepoints)
 export(make_future_dataframe)
 export(make_future_dataframe)

+ 1 - 1
R/R/plot.R

@@ -309,7 +309,7 @@ plot_seasonality <- function(m, name, uncertainty = TRUE) {
 #' @param uncertainty Boolean indicating if the uncertainty interval for yhat
 #' @param uncertainty Boolean indicating if the uncertainty interval for yhat
 #'  should be plotted. Must be present in fcst as yhat_lower and yhat_upper.
 #'  should be plotted. Must be present in fcst as yhat_lower and yhat_upper.
 #' @param ... additional arguments
 #' @param ... additional arguments
-#' @importFrom magrittr "%>%"
+#' @importFrom dplyr "%>%"
 #' @return A dygraph plot.
 #' @return A dygraph plot.
 #'
 #'
 #' @examples
 #' @examples

+ 1 - 1
R/man/df_for_plotting.Rd

@@ -1,5 +1,5 @@
 % Generated by roxygen2: do not edit by hand
 % Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/prophet.R
+% Please edit documentation in R/plot.R
 \name{df_for_plotting}
 \name{df_for_plotting}
 \alias{df_for_plotting}
 \alias{df_for_plotting}
 \title{Merge history and forecast for plotting.}
 \title{Merge history and forecast for plotting.}

+ 35 - 0
R/man/dyplot.prophet.Rd

@@ -0,0 +1,35 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/plot.R
+\name{dyplot.prophet}
+\alias{dyplot.prophet}
+\title{Plot the prophet forecast.}
+\usage{
+dyplot.prophet(x, fcst, uncertainty = TRUE, ...)
+}
+\arguments{
+\item{x}{Prophet object.}
+
+\item{fcst}{Data frame returned by predict(m, df).}
+
+\item{uncertainty}{Boolean indicating if the uncertainty interval for yhat
+should be plotted. Must be present in fcst as yhat_lower and yhat_upper.}
+
+\item{...}{additional arguments}
+}
+\value{
+A dygraph plot.
+}
+\description{
+Plot the prophet forecast.
+}
+\examples{
+\dontrun{
+history <- data.frame(ds = seq(as.Date('2015-01-01'), as.Date('2016-01-01'), by = 'd'),
+                      y = sin(1:366/200) + rnorm(366)/10)
+m <- prophet(history)
+future <- make_future_dataframe(m, periods = 365)
+forecast <- predict(m, future)
+dyplot.prophet(m, forecast)
+}
+
+}

+ 1 - 1
R/man/plot.prophet.Rd

@@ -1,5 +1,5 @@
 % Generated by roxygen2: do not edit by hand
 % Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/prophet.R
+% Please edit documentation in R/plot.R
 \name{plot.prophet}
 \name{plot.prophet}
 \alias{plot.prophet}
 \alias{plot.prophet}
 \title{Plot the prophet forecast.}
 \title{Plot the prophet forecast.}

+ 1 - 1
R/man/plot_forecast_component.Rd

@@ -1,5 +1,5 @@
 % Generated by roxygen2: do not edit by hand
 % Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/prophet.R
+% Please edit documentation in R/plot.R
 \name{plot_forecast_component}
 \name{plot_forecast_component}
 \alias{plot_forecast_component}
 \alias{plot_forecast_component}
 \title{Plot a particular component of the forecast.}
 \title{Plot a particular component of the forecast.}

+ 1 - 1
R/man/plot_seasonality.Rd

@@ -1,5 +1,5 @@
 % Generated by roxygen2: do not edit by hand
 % Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/prophet.R
+% Please edit documentation in R/plot.R
 \name{plot_seasonality}
 \name{plot_seasonality}
 \alias{plot_seasonality}
 \alias{plot_seasonality}
 \title{Plot a custom seasonal component.}
 \title{Plot a custom seasonal component.}

+ 1 - 1
R/man/plot_weekly.Rd

@@ -1,5 +1,5 @@
 % Generated by roxygen2: do not edit by hand
 % Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/prophet.R
+% Please edit documentation in R/plot.R
 \name{plot_weekly}
 \name{plot_weekly}
 \alias{plot_weekly}
 \alias{plot_weekly}
 \title{Plot the weekly component of the forecast.}
 \title{Plot the weekly component of the forecast.}

+ 1 - 1
R/man/plot_yearly.Rd

@@ -1,5 +1,5 @@
 % Generated by roxygen2: do not edit by hand
 % Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/prophet.R
+% Please edit documentation in R/plot.R
 \name{plot_yearly}
 \name{plot_yearly}
 \alias{plot_yearly}
 \alias{plot_yearly}
 \title{Plot the yearly component of the forecast.}
 \title{Plot the yearly component of the forecast.}

+ 1 - 1
R/man/prophet_plot_components.Rd

@@ -1,5 +1,5 @@
 % Generated by roxygen2: do not edit by hand
 % Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/prophet.R
+% Please edit documentation in R/plot.R
 \name{prophet_plot_components}
 \name{prophet_plot_components}
 \alias{prophet_plot_components}
 \alias{prophet_plot_components}
 \title{Plot the components of a prophet forecast.
 \title{Plot the components of a prophet forecast.

+ 1 - 1
R/man/seasonality_plot_df.Rd

@@ -1,5 +1,5 @@
 % Generated by roxygen2: do not edit by hand
 % Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/prophet.R
+% Please edit documentation in R/plot.R
 \name{seasonality_plot_df}
 \name{seasonality_plot_df}
 \alias{seasonality_plot_df}
 \alias{seasonality_plot_df}
 \title{Prepare dataframe for plotting seasonal components.}
 \title{Prepare dataframe for plotting seasonal components.}