[R-SIG-Mac] R 4.1.2 (arm build) will output for nothing when --interactive flag is passed
Simon Urbanek
@|mon@urb@nek @end|ng |rom R-project@org
Sun Jan 23 22:12:26 CET 2022
Year,
that code doesn't output anything on stdout, because it is an error so it does show up on stderr:
$ echo "base::cat('Hello\\\\n')\\n" | R --silent --no-save --interactive
> base::cat('Hello\\n')\n
Error: unexpected '\\' in "base::cat('Hello\\n')\"
What you probably meant was
$ echo 'cat("Hello\n")' | R --silent --no-save --interactive
> cat("Hello\n")
Hello
>
which works as expected.
Cheers,
Simon
> On Jan 23, 2022, at 12:33 PM, YearNorth via R-SIG-Mac <r-sig-mac using r-project.org> wrote:
>
> Dear developer:
>
> On R 4.1.2 (arm build) in macOS 12.0.1, if call R from shell, when —interactive flag is passed, it will output nothing.
>
> To reproduce it:
>
> ```
> echo "base::cat('Hello\\\\n')\\n" | R --no-save --interactive > test.txt
>
> ``
>
> doesn’t yield the derised output
>
> ```
> R version 4.1.2 (2021-11-01) -- "Bird Hippie”
> Copyright (C) 2021 The R Foundation for Statistical Computing
> Platform: aarch64-apple-darwin20 (64-bit)
>
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
>
> Natural language support but running in an English locale
>
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
>
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R
>
> ```
>
> The desired output should have a line `> base::cat('Hello\\n')\n` in test.txt
>
> This may be the critical problem for why `vscDebugger` (a R debugger for VSCode) does not work for arm build R.
>
> See the discussion on github
> https://github.com/ManuelHentschel/VSCode-R-Debugger/issues/155#issuecomment-1014946738 <https://github.com/ManuelHentschel/VSCode-R-Debugger/issues/155#issuecomment-1014946738>
> https://github.com/ManuelHentschel/VSCode-R-Debugger/issues/155#issuecomment-1017250405 <https://github.com/ManuelHentschel/VSCode-R-Debugger/issues/155#issuecomment-1017250405>
>
> Thanks for your time reading and processing my email!
>
> Best,
> North
> Year
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
More information about the R-SIG-Mac
mailing list