Open randy3k opened 3 years ago
@randy3k Thank you for raising this! Is the issue perhaps setting max.print = -1
for which -1
isn't a valid value? I tried this out with the code below, setting max.print
as a chunk option both with a positive number and -1. The value was respected with the positive number. For what it's worth, according to the documentation of the options
package, the default value for max.print
is 99999, a stand in for "print everything."
This is the preview of the notebook code below, after all chunks are run: issue_8778.nb.html.zip
Note in the output that options(max.print = -1)
fails with this message:
Error in options(max.print = -1) : invalid value for 'max.print'
Test code:
---
title: "Issue 8778"
author: "Ron Blum"
date: "1/22/2021"
output:
html_notebook: default
pdf_document: default
---
```{r}
library(DBI)
conn = dbConnect(RSQLite::SQLite())
dbWriteTable(conn, "iris", iris)
options(max.print = 17)
getOption("max.print")
This only shows as many records as in the global max.print
SELECT * from iris
A positive value for the chunk's max.print option is respected
SELECT * from iris
A negative value for the chunk's max.print option is ignored
SELECT * from iris
Setting max.print to a negative value isn't allowed
options(max.print = -1)
getOption("max.print")
dbDisconnect(conn)
Actually if you swap 17 and 5. You will see that the new value of 17 is not respected.
Try the following variation.
---
title: "Issue 8778"
author: "Ron Blum"
date: "1/22/2021"
output:
html_notebook: default
pdf_document: default
---
```{r}
library(DBI)
conn = dbConnect(RSQLite::SQLite())
dbWriteTable(conn, "iris", iris)
options(max.print = 5)
getOption("max.print")
This only shows as many records as in the global max.print
SELECT * from iris
A max.print value which is greater than the global max.print
is ignored.
SELECT * from iris
A negative value for the chunk's max.print option is ignored
SELECT * from iris
Setting max.print to a negative value isn't allowed
options(max.print = -1)
getOption("max.print")
dbDisconnect(conn)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs, per https://github.com/rstudio/rstudio/wiki/Issue-Grooming. Thank you for your contributions.
I believe that the bug is still not fixed.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs, per https://github.com/rstudio/rstudio/wiki/Issue-Grooming. Thank you for your contributions.
I am pretty sure that it has not been fixed.
System details
Steps to reproduce the problem
Open a Rmarkdown file. Create a SQL connection to
db
. Run the following chunks.