Question: I have a C++ interface with two methods. Any class implementing this interface need to implement at least one of the two methods but may define both. It is however not necessary to define both. What is the best pattern to use in such situation ?

Answer: 
As @ J\_F answered in the comments, using `{r echo = T, results = 'hide'}`. 

I wanted to expand on their answer - there are great resources you can access to determine all possible options for your chunk and output display - I keep a printed copy at my desk!

You can find them either on the RStudio Website under [Cheatsheets](https://www.rstudio.com/resources/cheatsheets/) (look for the R Markdown cheatsheet **and** R Markdown Reference Guide) or, in RStudio, navigate to the "Help" tab, choose "Cheatsheets", and look for the same documents there.

Finally to set **default chunk options**, you can run (in your first chunk) something like the following code if you want most chunks to have the same behavior:

```
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = T,
                      results = "hide")
```

```

Later, you can **modify the behavior of individual chunks** like this, which will replace the default value for *just* the results option.

```
```{r analysis, results="markup"}
# code here
```

```
For muting `library("name_of_library")` codes, meanly just showing the codes, `{r loadlib, echo=T, results='hide', message=F, warning=F}` is great. And imho a better way than `library(package, warn.conflicts=F, quietly=T)`