I have this code
pdf("~/BoxplotsToday.pdf")
for (i in unique(datanew$Trait)){
print( datanew %>%
filter(between(value, 0, 2)) %>% filter(Marker %in% levels(datanew$Marker)) %>%
ggplot(aes(x= value, y = audpc, fill= value))+ geom_boxplot()+
facet_wrap_paginate(~Marker, nrow=3, ncol = 5, page = i))
}
dev.off()
I want to save several box plots in a pdf but it is not working. Can someone please help me?
pe2ju
April 12, 2022, 1:23pm
2
Here is the dataset, I joined several data together to get this.
pe2ju
April 12, 2022, 2:18pm
4
Yet is ambiguous to track what you want to do. Please provide a minimal reproducible code with your sample data. Use reprexhttps://reprex.tidyverse.org/ package to achieve this. Or, else you can provide a link to access some sample data. Take an example down here for a reproducible case;
datanew <- data.frame( Marker = rep("u1", 5),
value = c(rep(0, 2), rep(1, 3) ),
Traints = c( "Jul.10", "Aug.27", "Oct.01", "Jul.10", "Jan.25"),
audpc = c( 10.5, 131, 55, 150, 98) )
datanew
#> Marker value Traints audpc
#> 1 u1 0 Jul.10 10.5
#> 2 u1 0 Aug.27 131.0
#> 3 u1 1 Oct.01 55.0
#> 4 u1 1 Jul.10 150.0
#> 5 u1 1 Jan.25 98.0
system
Closed
May 3, 2022, 2:19pm
5
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.