Hi everyone!
I'm trying to make a package containing a few themes and palettes for ggplot2.
I have a couple of questions that I couldn't find the answer to on Google; I'd be really grateful to anyone who can help me out!
1. How do I combine two (or more) functions into one function?
I want to combine the theme and scale_colour functions into one function. For example, I'd like to just write "+ viridisbw()" and have the viridis colour scales + the bw theme. Is there any way of writing a viridisbw() function that is just a combination of these two functions? When I tried to write two functions inside one, only the last written function worked.
2. How do I plot only colour palettes?
In other words, how do I basically do display.brewer.pal for my own palettes?
Many thanks in advance!