Comments (6)
Hi. This sounds like knitr's issue.
Anyway, it sounds good to me to logging on the console or somewhere.
In this way, users can stop knitting once they find some unexpected messages or warnings.
On the other hand, I would keep the current behavior of the chunk options (message
, warning
and error
) for the simplicity.
An alternative approach would be to provide package options for logging, e.g., knitr::opts_knit(loglevel = "warning", logfile = "stderr")
.
According to the docs
Would you provide a link to the doc that describes your expected behavior?
I briefly read through https://yihui.org/knitr/options/ , but cannot find it.
from rmarkdown.
Thanks for the fast reply. It is possible knitr and not rmarkdown. Should anyone else run into a need to log to the console, I just found the logger package:
logger::log_info('I will print to the console!')
Which is a much more direct way to address this.
from rmarkdown.
FALSE
will completely suppress the messages. If you want messages to be printed to the console, you can use NA
. More info here: https://yihui.org/en/2022/12/message-false/ (I need to update the doc at https://yihui.org/knitr/options/).
from rmarkdown.
@yihui Thank you, your first post fits. I was sure the behavior used to be that message=FALSE would print them, but I could not find the docs on it. message=NA does behave as you posted. Nonetheless, I think explicitly logging is probably a more clear route and I think we'll use this.
It would be great if you could update the docs since it took a while to figure out the expected behavior.
from rmarkdown.
I'll update the docs for sure. Sorry about the confusion!
from rmarkdown.
Docs have been updated. Thanks!
from rmarkdown.
Related Issues (20)
- [FR] shiny server context code echoing HOT 1
- pdflatex error when rendering in locale LC_NUMERIC=fr_FR.UTF-8 HOT 14
- dev.args encoding issue with unicode symbol HOT 2
- find_pandoc() gives annoy warning when user name is in non-latin HOT 1
- header-includes in YAML field does not work for HTML format
- &emsp is printed as is instead of producing a tab when knitting to PDF even with pdf_document2 HOT 7
- Persistent resetting of "Editor content width" in visual mode of Rmarkdown docs HOT 1
- `rmarkdown::render()` corrupts input file HOT 5
- Error when rendering in new environment some code with gt HOT 3
- file.path("", "../path/file") and intermediates_dir make Rmarkdown create <intermediates_dir>/../path/file HOT 2
- `fig.dim` doesn't work (rmarkdown: 2.25) HOT 2
- `shiny_prerendered` parses `DESCRIPTION` file from wrong location HOT 5
- TOC get stuck if using lvl below {.tableset} AND TOC-depth on lower lvl than the 'tabs'
- loading python package via reticulate fails with `rmarkdown::render` whereas `Rscript` succeeds HOT 5
- Has rmarkdown rendering of images included via markdown with alt text changed? How to avoid md markup conversion to html? HOT 4
- Citations not working where multiple articles from same author in same year HOT 18
- Safer latex_dependency insertion HOT 2
- `find_external_resources` needs to consider quarto theme file
- change pandoc_convert return.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rmarkdown.