Infix function code in Rmarkdown Rstudio

Hi! Welcome!

It sounds like this might be a question related to an assignment for a class? If so, please first take a look at our policy on such questions:

(You might also want to check out FAQ: Tips for writing R-related questions)

P.S. This is a question about the R language, not something specific to R Markdown or the RStudio IDE, so I changed the topic category and tags.