createString: Utility function (Internal, not exported) to convert argument...

Description Usage Arguments Value Examples

Description

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

Usage

1
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

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


## End(Not run)

andybeet/obdbs documentation built on Feb. 5, 2021, 9:24 p.m.