Diff of /inst/develop.R [000000] .. [0bdad5]

Switch to unified view

a b/inst/develop.R
1
library(hexSticker)
2
library(UCSCXenaTools)
3
library(dplyr)
4
library(ggpubr)
5
6
df =  XenaData %>%
7
    dplyr::group_by(XenaHostNames) %>%
8
    dplyr::summarise(count = n())
9
10
# reference https://rpkgs.datanovia.com/ggpubr/
11
ggdotchart(df, x = "XenaHostNames", y = "count",
12
           color = "XenaHostNames",
13
           palette = "jco",
14
           sorting = "descending",                       # Sort value in descending order
15
           add = "segments",                             # Add segments from y = 0 to dots
16
           rotate = TRUE,                                # Rotate vertically
17
           dot.size = 2,                                 # Large dot size
18
           label = round(df$count),                        # Add mpg values as dot labels
19
           font.label = list(color = "white", size = 2,
20
                             vjust = 0.5),               # Adjust label parameters
21
           ggtheme = theme_void()) +                       # ggplot2 theme
22
    theme_transparent() + theme(legend.position = "none") -> p
23
24
sticker(p, package="UCSCXenaTools", p_size=4.5, s_x=0.9, s_y=1, s_width=1.7, s_height=1.3,
25
        p_x = 1.1, p_y = 0.9,
26
        url = "https://cran.r-project.org/package=UCSCXenaTools", u_color = "white", u_size = 1,
27
        h_fill="black", h_color="grey",
28
        filename="man/figures/logo.png")