/bubblematrix

create the bubble matrix plot

Primary LanguageR

bubblematrix

R-CMD-check INFO

This package is created to help create your own bubble matrix plot.

Test and build package

library(roxygen2)
roxygenize("/Users/hanbujishenmebuhui/Desktop/my R pkg/bubblematrix")
library(devtools)
check("/Users/hanbujishenmebuhui/Desktop/my R pkg/bubblematrix")
load_all()
bubblematrix::bubble_matrix()
bubblematrix::example_data
#build the package
build("/Users/hanbujishenmebuhui/Desktop/my R pkg/bubblematrix")

There are no errors or warning.

Installation

You can install the released version of bubblematrix from GitHub with:

# install.packages("devtools")
devtools::install_github("hyj12345/bubblematrix")

Example

Let's use the data in the package to have a simple test

View the built-in dataset

library(bubblematrix)
data(package="bubblematrix")
example_data<-bubblematrix::example_data

And we can get the information:

image-0

And the data

image-0

Create the bubble matrix plot

  • Just use the default parameters
bubble_matrix(data = example_data)

And we can get the (ploty) plot

image-1

  • Use the customized parameters
bubble_matrix(data = example_data,percentile = c(0,0.5,1),
              labels = c('Lowest part','Highest part'),
              color = c('red','black'),
              title = 'Bubble matrix plot',subtitle = 'test the pkg'
              ,caption = '@YJ_Han',ploty_ = FALSE)

And we can get the plot

image-2