Search code examples
rmarkup

R markup Loading more than one package


I need to load two packages to make all my calculations and create a document by using r mark-up. For this I have this code:

library(knitr)
library(dplyr)

But when I use knit Word to build my document I get this in text:

## 
## Attaching package: 'dplyr'
## 
## The following object is masked from 'package:stats':
## 
##     filter
## 
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union

Any clues on what I can do to get rid of this, without stop loading it?

If I call only one library it works fine, but I need to call two...


Solution

  • Try setting the chunk options to {r, message = FALSE}. knitr has many features to manipulate how much code/output is displayed. See http://yihui.name/knitr/demo/output/