vlookup.Rd
A simple implementation similar to the VLOOKUP function in Excel.
vlookup(this, df, key, value)
The value to look up
A data frame
The column to look up
The column to return
The value in the value
column corresponding to the key
column
df <- data.frame(key = c("a", "b", "c"), value = c(1, 2, 3))
print(misc::vlookup("b", df, "key", "value"))
#> [1] 2