From 6d7ddad916d32e275d5b139b115cbd9226529456 Mon Sep 17 00:00:00 2001 From: Carson Sievert Date: Wed, 18 May 2016 11:28:34 +1000 Subject: [PATCH] documentation changes for R CMD check --- R/print.R | 1 + man/ggplotly.Rd | 2 ++ man/knit_print.plotly_built.Rd | 2 ++ vignettes/intro.Rmd | 4 +++- vignettes/subplot.Rmd | 13 ++++++++++++- 5 files changed, 20 insertions(+), 2 deletions(-) diff --git a/R/print.R b/R/print.R index a22c9a65dd..4985fd3e04 100644 --- a/R/print.R +++ b/R/print.R @@ -29,6 +29,7 @@ knit_print.plotly_hash <- function(x, options, ...) { #' Print a 'built' plotly object in a knitr doc #' #' @param x a plotly object +#' @param options knitr options. #' @param ... additional arguments #' @export knit_print.plotly_built <- knit_print.plotly_hash diff --git a/man/ggplotly.Rd b/man/ggplotly.Rd index be0b7d66ff..a0f4f066b8 100644 --- a/man/ggplotly.Rd +++ b/man/ggplotly.Rd @@ -22,6 +22,8 @@ also control the order they appear. For example, use colour last.} \item{source}{Only relevant for \link{event_data}.} + +\item{...}{arguments passed onto methods.} } \value{ a plotly object diff --git a/man/knit_print.plotly_built.Rd b/man/knit_print.plotly_built.Rd index 4d40d44036..67cb3f08cc 100644 --- a/man/knit_print.plotly_built.Rd +++ b/man/knit_print.plotly_built.Rd @@ -9,6 +9,8 @@ knit_print.plotly_built(x, options, ...) \arguments{ \item{x}{a plotly object} +\item{options}{knitr options.} + \item{...}{additional arguments} } \description{ diff --git a/vignettes/intro.Rmd b/vignettes/intro.Rmd index 8f0a3280f7..15a3c20134 100644 --- a/vignettes/intro.Rmd +++ b/vignettes/intro.Rmd @@ -1,7 +1,9 @@ --- title: "An overview of plotly's R API" author: "Carson Sievert" -output: rmarkdown::html_vignette +output: + rmarkdown::html_vignette: + self_contained: false vignette: > %\VignetteEngine{knitr::rmarkdown} %\VignetteIndexEntry{Plotly DSL} diff --git a/vignettes/subplot.Rmd b/vignettes/subplot.Rmd index 72e25739fa..a22cfa8db0 100644 --- a/vignettes/subplot.Rmd +++ b/vignettes/subplot.Rmd @@ -4,7 +4,7 @@ author: "Carson Sievert" output: rmarkdown::html_vignette: toc: true - standalone: false + self_contained: false vignette: > %\VignetteEngine{knitr::rmarkdown} %\VignetteIndexEntry{subplot} @@ -17,6 +17,17 @@ knitr::opts_chunk$set( comment = "#>", fig.width = 7 ) +# someday we may want to do pngs to reduce size... +# printly <- function(p, options, ...) { +# p <- layout(p, height = options$fig.height, width = options$fig.width) +# u <- plotly::plotly_POST(p, filename = Sys.time())$url +# sprintf( +# " ", +# u, u, "max-width:100%" +# ) +# } +# assignInNamespace("knit_print.plotly_hash", printly, asNamespace("plotly")) +# assignInNamespace("knit_print.plotly_built", printly, asNamespace("plotly")) ``` ## Introduction