Hi, and welcome to community.rstudio.com!
identical(!!(1:10), rep(10, TRUE) )
So, what makes them not identical?
I don't know if you swapped the syntax intentionally in your second-to-last chunk, but if you run
identical(!!(1:10), rep(TRUE, 10)), you get
> identical(!!(1:10), rep(TRUE, 10))
Notice the arguments inside
TRUE, 10, not
10, TRUE as you have in your post. So in my code,
TRUE is being repeated 10 times, which makes it identical to the vector created by
As for correct usage - I think this gets into quosures, which I'm not seasoned with, so hopefully someone more familiar can chime in here!
By the way, it seems there's some overlap between this post and the other post you've made here:
Are both of these posts seeking the same information?