-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlookup.Rd
27 lines (23 loc) · 884 Bytes
/
lookup.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tweak.R
\name{lookup}
\alias{lookup}
\title{Perform vlookups similar as in Excel}
\usage{
lookup(value, lookup_table, lookup_column_number, return_column_number,
type = "exact")
}
\arguments{
\item{value}{An element to look up. Can be be of any type}
\item{lookup_table}{A data frame to look up the value in}
\item{lookup_column_number}{A column number of the lookup table where the value should be found}
\item{return_column_number}{A column number of the lookup table from which the corresponding value should be returned}
\item{type}{Type of lookup. Defaults to "exact"}
}
\description{
This function allows to perform vlookup in a similar way as in Excel.
}
\examples{
lookup_table <- data_frame(x = seq(1, 10, length.out = 10), y = letters[1:10])
lookup(5, lookup_table, 1, 2, type = "exact")
}