The most helpful and easiest-to-forget R tip

less than 1 minute read

Published:

I always, always forget this quick time-saver:

This StackOverflow answer reminds me that placing an R command assigning an expression/variable in parentheses will force automatic printing upon execution as follows:

n<-3
n  
##[1] 3

# versus

(n <- 3)
##[1] 3

Tags: