r-lib / rlang

Low-level API for programming with R
https://rlang.r-lib.org
Other
502 stars 139 forks source link

Confusion about `enexprs` #1685

Closed Longfei2 closed 8 months ago

Longfei2 commented 8 months ago

why does enexprs inside function return the quosure when using embrace operator {{? This is inconsistent with help document: return the naked expression? see the example as below:

test1 <- function(...){

  print(rlang::enexprs(...))
  m <- rlang::enexprs(...)
  print(m)
  print(lapply(m, typeof))

}

test2 <- function(x){
  test1({{x}})
}

image

image

Could you please help me understand this function?

Longfei2 commented 8 months ago

I have retrieved the issue #1523, thank you.