lookup: Perform vlookups similar as in Excel

Description Usage Arguments Examples

Description

This function allows to perform vlookup in a similar way as in Excel.

Usage

1
2
lookup(value, lookup_table, lookup_column_number, return_column_number,
  type = "exact")

Arguments

value

An element to look up. Can be be of any type

lookup_table

A data frame to look up the value in

lookup_column_number

A column number of the lookup table where the value should be found

return_column_number

A column number of the lookup table from which the corresponding value should be returned

type

Type of lookup. Defaults to "exact"

Examples

1
2
lookup_table <- data_frame(x = seq(1, 10, length.out = 10), y = letters[1:10])
lookup(5, lookup_table, 1, 2, type = "exact")

konradsemsch/aider documentation built on May 22, 2019, 2:40 p.m.