evaluate
evaluate copied to clipboard
A version of eval for R that returns more information about what happened
on windows, to correctly parse text, you need to do: ``` r parse(text = code, encoding = Encoding(code)) ``` if the `code` has set an encoding, it gets returned by...
It is probably a good idea to update the tests suites to a more modern usage. * Some of the tests still use the old form `expect_that()` and `equals()`. *...
## Context I am writing a package that implements a standardized logging function using `sink(...)`. I would like to be able to use RMarkdown to write the vignettes for the...
I don't know if this is possible or not but currently we have this ```r > evaluate::evaluate("stop('a')") [[1]] $src [1] "stop('a')" attr(,"class") [1] "source" [[2]] > evaluate::evaluate('e
Related question on SO: https://stackoverflow.com/questions/66603676/capture-error-messages-as-character-string-in-r/66660202 For pedagogical purposes, it would be usefull to capture "console error" rather than "parser error". ``` 2 2 #> Error: unexpected numeric constant in "2...
@lionel- and I have talked about this (https://github.com/tidyverse/reprex/issues/320#issuecomment-670358939) but I want to open a specific issue. Until this happens, `rlang::last_error()` and `rlang::last_trace()` don't work, in general, in knitr and, therefore,...
It would be a really cool if evaluate would have an option to include a stack trace for errors. I can see this useful for debugging the call that was...
Some examples: ``` r Sys.setlocale(, 'English') # can also try 'German_Austria' # [1] "LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252" evaluate::evaluate("'\u0161'") # [[1]] # $src # [1] "'š'" # # attr(,"class") #...
For some reason sink inside evaluate isn't nesting the sink statements. Is this supported or supportable? It happens in window10 and redhat7 code sink.number() [1] 1 > sink('c:/temp/sink-example.txt') > sink.number()...
**Update** my initial diagnosis was wrong. It looks like somewhere there is some warm-up required: ```r > library(evaluate) > options(device = function(file, ...){ + pdf(NULL, ...) + }) > >...