I am inside a user generated function in R and want some lines of code to be conditioned on the parameters. For example, `Position` is an input for the function. I want to display or not display an axis if this variable is 2 or 4. This is what I have but it doesn't seem to work. Is something like this possible in R? (see line 2 of the code)

```
Themes <- theme(axis.title = element_text(size=fsizes),
                  if(Position == 2 | Position == 4, axis.text.x=element_blank() , axis.text.x = element_text(size=fsizes, color = "black")), 
                  axis.text.y = element_text(size=fsizes, color = "black"), 
                  title=element_text(size=fsizes), 
                  legend.text=element_text(size=fsizes-1.5),
                  legend.key.width = unit(.1, "cm"), legend.key.height = unit(.2, "cm"),
                  legend.position = "top",
                  legend.direction = "horizontal",
                  legend.margin = unit(0, 'cm'),
                  axis.ticks = element_line(size = .2),
                  panel.grid.major = element_line(size=.2),
                  panel.grid.minor = element_line(size=.1),
                  plot.margin = unit(c(.1,.1,.1,0), 'cm')
                  )

```