We are writing a book where we want to show the error message from some code but not a traceback. For example
library(tidyverse)
tibble(x = 1:2) %>%
map_dbl(sort)
where we specified the chunk with {r, error=TRUE}
.
How can we get the error message without the traceback?
Thanks
If you go to this page and search for "Backtrace", you'll see the result.
The site was rendered using rmarkdown::render_site()
, and the source code is here .
Thanks
cderv
April 19, 2019, 6:13am
4
This seems unusual!
This backtrack if from rlang.
Did you configured something like this from rlang somewhere? .Rprofile
?
I don't have an .Rprofile, but I updated rlang to the current version, and the problem disappeared.
Many thanks, we can close this question.
cderv
April 19, 2019, 6:33am
6
Glad it pointed out to the right thing.
If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:
If your question has been answered, don't forget to mark the solution!
How do I mark a solution?
Find the reply you want to mark as the solution and look for the row of small gray icons at the bottom of that reply. Click the one that looks like a box with a checkmark in it:
[image]
Hovering over the mark solution button shows the label, "Select if this reply solves the problem". If you don't see the mark solution button, try clicking the three dots button ( ••• ) to expand the full set of options.
When a solution is chosen, the icon turns green and the hover label changes to: "Unselect if this reply no longer solves the problem". Success!
[solution_reply_author]
…
system
Closed
May 10, 2019, 6:33am
7
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.