Thomas Lumley 9/10/2019

(What’s up with the brackets?)

Read Original

This technical article examines a common R programming behavior: why wrapping an assignment in parentheses, like `(x = runif(10))`, causes the value to print. It delves into R's invisibility flag, how functions like `print()` and `boxplot()` use `invisible()` to suppress output, and how the primitive `(` function strips this invisibility, leading to the displayed result.

(What’s up with the brackets?)

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser