I'm running PCAtools on a cancer and control samples with this code:
bp1 <- PCAtools::biplot(pcaobj = PCA, colby = 'group', colkey = c(control = 'blue', cancer = 'pink'), legendPosition = "right", lab = NULL, hline = 0, vline = 0) geom_point(shape = 1,size = 3,colour = "black") + theme(legend.title = element_blank(), legend.position=c(0.9,0.9), legend.background = element_rect(fill="white", size=.5, linetype="dotted"), legend.box.background = element_rect(colour = "black"))
The error I'm getting is: Scale for 'colour' is already present. Adding another scale for 'colour', which will replace the existing scale.
Running the above code I get the plots, but they're just empty circles, however if I comment out
colkey I'll get the default colours. I'm not sure what I'm doing wrong here.
R version 4.0.3 (2020-10-10) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Catalina 10.15.7