Learn R Programming

sqlcaser (version 0.2.0)

inlist: Generate a SQL IN statement from a mapping file

Description

This function constructs an IN statement from a mapping file or dataframe. It assumes that the first column of the data contains the list of values to check for.

Usage

inlist(inputfile = NULL, header = FALSE)

Value

A string that represents the constructed CASE statement

Arguments

inputfile

Dataframe OR path to the mapping file

header

If reading a csv file, TRUE if the file includes a header row, FALSE if it does not include a header row.

Examples

Run this code
 input <- Data_Frame <- data.frame(Training = c("Strength", "Stamina",
  "Other"))
 result <- inlist(inputfile = input, header = TRUE)

Run the code above in your browser using DataLab