I want to filter out one factor so I can plot ggplot with the rest, I tried the following, but it did not work:
library(ggplot2)
figvad <- read.csv(url("https://raw.githubusercontent.com/learnseq/learning/main/vadev.txt"),sep = '\t',header = TRUE)
figvadc <- figvad %% c(!=Pre-clinical)
I also used:
library(tidyverse)
library(ggplot2)
figvad <- read.csv(url("https://raw.githubusercontent.com/learnseq/learning/main/vadev.txt"),sep = '\t',header = TRUE)
figvadclinic<-figvad %>%
rownames_to_column("Type") %>%
filter(stringr::str_detect(type, 'Pre-clinical') )
library(repr, warn.conflicts = FALSE)
options(repr.plot.width=17, repr.plot.height=10)
ggplot(figvadclinic, aes(x=Phase, fill=Type)) +
geom_bar(width = 0.5) +
coord_polar()+
theme(panel.grid.major = element_blank(), element_text(size=25, face=4L))+
theme_minimal()