79489130

Date: 2025-03-06 11:16:48
Score: 0.5
Natty:
Report link

If you want the pretty-print effect of print(obj), but output to stderr, use capture.output with file=stderr(). This is a wrapper on sink() as mentioned in another response.

capture.output( list(A=1,B=5:2), file=stderr())

The following goes to stderr

$A
[1] 1

$B
[1] 5 4 3 2
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Grady