knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of ggradialbar
is to provide ggplot2
geom extensions for the radial barchart visualization. This package is based on Uli Niemann’s
code, with new geom layer implementations using 'ggproto' system of object oriented programming used in ggplot2
.
You can install the released version of ggradialbar from CRAN with:
install.packages("ggradialbar")
Or the development version from GitHub with:
# install.packages("devtools") devtools::install_github("Ashish-Soni08/ggradialbar")
ggradialbar
Note: This is just a friendly reminder about the data transformations needed, before you plot the data using the visualization provided by ggradialbar
. The first two transformations already take place when you perform Clustering.
We recommened using dummify()
from the DataExplorer
package. It takes three arguments:
data : Input data
maxcat : maximum categories allowed for each discrete feature. Default is 50.
select : names of selected features to be dummified. Default is NULL
.
returns a dummified dataset (discrete features only) preserving original features. Column order might be different.
Note:
Continuous features will be ignored if added in select
.
select
features will be ignored if categories exceed maxcat
.
You can find an example below.
# install.packages("librarian") librarian::shelf(tidyverse, DataExplorer , quiet = TRUE) dummified_dataset <- dummify(iris, maxcat = 5, select = "Species") head(dummified_dataset)
scaled_dataset <- scale(dummified_dataset, center = TRUE, scale = TRUE) scaled_dataset <- as_tibble(scaled_dataset) head(scaled_dataset)
ggplot2
functions like data in the 'long' format , so convert data from wide to long form.data <- pivot_longer(data = scaled_dataset, names_to = "feature", values_to = "value", cols = everything()) head(data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.