diff --git a/R/PolyCharts.R b/R/PolyCharts.R index 5f43411..84e9df0 100644 --- a/R/PolyCharts.R +++ b/R/PolyCharts.R @@ -42,8 +42,10 @@ fixJSON = function(x){ #' Main plotting function #' #' @examples +#' \dontrun{ #' names(iris) = gsub('\\.', '', names(iris)) #' rPlot(SepalLength ~ SepalWidth | Species, data = iris, type = 'point', color = 'Species') +#' } #' #' rPlot <- function(x, ...){ diff --git a/R/gist.R b/R/gist.R index ad5cc96..10648a9 100644 --- a/R/gist.R +++ b/R/gist.R @@ -7,7 +7,9 @@ #' @importFrom rjson fromJSON #' #' @examples +#' \dontrun{ #' gist = create_gist(gfiles, description = 'description', public = T) +#' } post_gist <- function(gist){ if (is.null(getOption('github.username'))){ username <- readline("Please enter your github username: ") diff --git a/R/toJSON.R b/R/toJSON.R index 7fc9e36..b1d079e 100644 --- a/R/toJSON.R +++ b/R/toJSON.R @@ -8,7 +8,9 @@ #' @importFrom rjson toJSON #' @keywords internal #' @examples +#' \dontrun{ #' toJSONArray(head(iris)) +#' } toJSONArray <- function(obj, json = TRUE){ list2keyval <- function(l){ keys = names(l) @@ -37,8 +39,10 @@ toJSONArray <- function(obj, json = TRUE){ #' @keywords internal #' @importFrom rjson toJSON #' @examples +#' \dontrun{ #' toChain(list(showControls = TRUE, showDistX = TRUE), "chart") #' ## chart.showControls(true).showDistX(true) +#' } toChain <- function(x, obj){ config <- sapply(names(x), USE.NAMES = F, function(i){ sprintf(" .%s(%s)", i, toJSON(x[[i]])) diff --git a/man/post_gist.Rd b/man/post_gist.Rd index 2ba67f1..56dcfa4 100644 --- a/man/post_gist.Rd +++ b/man/post_gist.Rd @@ -15,6 +15,8 @@ Publish a list of files as a gist } \examples{ +\dontrun{ gist = create_gist(gfiles, description = 'description', public = T) } +} diff --git a/man/rPlot.Rd b/man/rPlot.Rd index 9fcb5f9..ec2d727 100644 --- a/man/rPlot.Rd +++ b/man/rPlot.Rd @@ -8,7 +8,9 @@ Main plotting function } \examples{ +\dontrun{ names(iris) = gsub('\\\\.', '', names(iris)) rPlot(SepalLength ~ SepalWidth | Species, data = iris, type = 'point', color = 'Species') } +} diff --git a/man/toChain.Rd b/man/toChain.Rd index 740c95b..514c2f4 100644 --- a/man/toChain.Rd +++ b/man/toChain.Rd @@ -9,9 +9,11 @@ acting on a specified object. } \examples{ +\dontrun{ toChain(list(showControls = TRUE, showDistX = TRUE), "chart") ## chart.showControls(true).showDistX(true) } +} \author{ Ramnath Vaidyanathan } diff --git a/man/toJSONArray.Rd b/man/toJSONArray.Rd index 6ca2bc1..4f26aaa 100644 --- a/man/toJSONArray.Rd +++ b/man/toJSONArray.Rd @@ -11,8 +11,10 @@ row of the data frame. This utility function does that. } \examples{ +\dontrun{ toJSONArray(head(iris)) } +} \author{ Ramnath Vaidyanathan }