I want my html file to show the code, but not the output of this chunk:
```{r echo=True, include=FALSE}
fun <- function(b)
{
for(a in b)
{print(a)
return(a * a)}
}
y <- fun(b)
```
When I run the code, i need the print to see the progress (it is quite a long function in reality).
But in the knitr file, I use the output in a further chunk, so I do not want to see it in this one (and there's no notion of progress, since the code has already been run).
This echo=True, include=FALSE
here does not work: the whole thing is hidden (which is the normal behavior of include=FALSE
).
What are the parameters I could use to hide the prints, but show my code?
{r echo=T, results='hide'}
– J_Fresults
parameter before – Laurentresults='hide'
will still show things like warnings, like when an object is masked when usinglibrary(package)
. Is there an option to hide everything that would be printed to the console? – straguwarn.conflicts=F, quietly=T
in yourlibrary
command, likelibrary(package, warn.conflicts=F, quietly=T)
– Laurent