glue
glue copied to clipboard
`glue_data()` documentation should mention that named arguments take precedence over `.x`
glue_data()
currently gives priority to named arguments over elements of .x
.
glue::glue_data("SELECT {x}", .x = list(x = 1), x = 2)
#> "SELECT 2"
This seems perfectly reasonable: if your query includes a value you went to the trouble of setting as a named argument, that value should probably take precedence over a possibly unexpected similar name in .x
.
However, this behavior should probably be made clear in the documentation.