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") )