Limit function output in Rstudio (3.1.1) when knitting in PDF

I would like to limit the number of lines created by the function when I embed my document with markdown in R. I looked around a lot, but I can not find a solution.

My code is below, it gives 50+ lines of data at startup. My goal is to have only 9 lines of code created by the sedist function.

```{r, results=1:9} sedist(FILENAME, method="correlation") ``` 

I tried using {r, message=1:9} , {r, Hide=1:9} , {r, height=1:9} , {r, results='hide'} and the like.

+5
source share
1 answer

Something like that??

 ```{r R.options=list(max.print=10)} df <- data.frame(x=1:100,y=1:100) df ``` 

The R.options chunk parameter in knitr allows you to set any of the R parameters locally for this fragment. See ?options Options for a list of options you can set

+6
source

Source: https://habr.com/ru/post/1204066/


All Articles