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

createStringYear(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

if (FALSE) {
createString(itemName="area",area=503,convertToCharacter=TRUE,numChars=3)
createString(itemName="species_itis",species,convertToCharacter=TRUE,numChars=6)

}