createString: Utility function to convert argument to strings

View source: R/createString.R

createStringR Documentation

Utility function to convert argument to strings

Description

inputs to get_ functions are required as strings when passed as a sql statement This function converts numeric inputs to character strings

Usage

createString(itemName, chosenItem, convertToCharacter, numChars)

Arguments

itemName

Character string. Variable name as it exists in the data base

chosenItem

User input value of variable listed in itemName

convertToCharacter

Boolean. Should we convert the chosenItem to a character string (This depends on how the variable is declared in the database)

numChars

Numeric scalar. Number of characters to format the numeric chosenItem as.

Value

A charachter string

Examples

## Not run: 
createString(itemName="area",area=503,convertToCharacter=TRUE,numChars=3)
createString(itemName="species_itis",species,convertToCharacter=TRUE,numChars=6)


## End(Not run)

andybeet/dbutils documentation built on March 15, 2024, 4:43 p.m.