From a1ac3796782bf32e5afe649d01596607ea444322 Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Sat, 23 Mar 2024 21:32:14 +0100 Subject: [PATCH] fix example --- R/coord_radar.R | 4 +++- man/coord_radar.Rd | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/R/coord_radar.R b/R/coord_radar.R index ad0fd9730..3f73e215a 100644 --- a/R/coord_radar.R +++ b/R/coord_radar.R @@ -6,10 +6,12 @@ #' @param ... Other arguments to be passed to `ggproto`. #' #' @examples +#' library(ggplot2) +#' #' # Create a radar/spider chart with ggplot: #' data(iris) #' data <- aggregate(iris[-5], list(Species = iris$Species), mean) -#' data <- data_to_long( +#' data <- datawizard::data_to_long( #' data, #' c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width") #' ) diff --git a/man/coord_radar.Rd b/man/coord_radar.Rd index 64052975b..51569bd95 100644 --- a/man/coord_radar.Rd +++ b/man/coord_radar.Rd @@ -20,10 +20,12 @@ is applied clockwise or anticlockwise depending on value of \code{direction}.} Add a radar coordinate system useful for radar charts. } \examples{ +library(ggplot2) + # Create a radar/spider chart with ggplot: data(iris) data <- aggregate(iris[-5], list(Species = iris$Species), mean) -data <- data_to_long( +data <- datawizard::data_to_long( data, c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width") )