Public-Health-Scotland / phslookups

PHS Lookups
https://public-health-scotland.github.io/phslookups/
Other
0 stars 0 forks source link

Fix for col_select. #9

Closed Nic-Chr closed 1 month ago

Moohan commented 1 month ago

Thanks Nic, this does make it work in this case get_spd(col_select = dplyr::matches("pc[78]")) but it still doesn't work in this case get_spd(col_select = c("pc7", dplyr::starts_with("hb"))) although it's a much more interesting error than previously :D

I made a commit to add some tests with these two examples

Nic-Chr commented 1 month ago

It's because the curly braces aren't used in get_spd(). For tidy expressions to work you need to create quosures and defuse them throughout each function call.

I've now fixed this in the latest commit but do let me know if it doesn't work as intended.