Hello everyone,
I'm struggling with ggpattern right now, seems easy to fix but I can't do a simple barplot with patterns.
Here's my script :
x<-factor(riviere$Caging.Time, c('0', '7', '14', '20'))
y<-riviere$Antib_r
pattern.type<-c('hdashes', 'blank', 'crosshatch', 'crosshatch')
pattern.color=c('black','black', 'black', 'black')
background.color=c('white','white', 'white', 'white')
density<-c(20, 20, 20, 20)
p<-patternbar(riviere,x, y,group=NULL, pattern.type=pattern.type,pattern.color=pattern.color, background.color=background.color,pattern.line.size=c(5.5, 1, 4),frame.color=c('black', 'black', 'black', 'black'), density=density, vjust=-1, hjust=0.5, bar.width=0.75)+scale_y_continuous(limits = c(0, 8000))+ggtitle('(A) Vertical Bar Chart')
p
R Studio sends this error message :
Error in if (type == "blank") { : missing value where TRUE/FALSE needed
I've searched everywhere but I've never seen a similar problem with patternplot. Anyone has an idea ?