Modify certain values in a data frame by indirect reference to the columns
问题 I'm wrangling some data where we sort fails into bins and compute limited yields for each sort bin by lot. I have a meta table that describes the sort bins. The rows are arranged in ascending test order and some of the sort labels come in with non-syntactic names. sort_tbl <- tibble::tribble(~weight, ~label, 0, "fail A", 0, "fail B", 0, "fail C", 100, "pass") > sort_tbl # A tibble: 4 x 2 weight label <dbl> <chr> 1 0 fail A 2 0 fail B 3 0 fail C 4 100 pass I have a data table of limited yield