Check out example codes for "R Markdonw - Hide plots". It will help you in understanding the concepts better.

Code Example 1

# Hide source code:

```{r, echo=FALSE}
1 + 1
```

# Hide text output (you can also use `results = FALSE`):

```{r, results='hide'}
print("You will not see the text output.")
```

# Hide messages:

```{r, message=FALSE}
message("You will not see the message.")
```

# Hide warning messages:

```{r, warning=FALSE}
# this will generate a warning but it will be suppressed
1:2 + 1:3
```

# Hide plots:

```{r, fig.show='hide'}
plot(cars)
```

Learn ReactJs, React Native from akashmittal.com