Learn R Programming

formods (version 0.2.1)

autocast: Automatically Cast UI Input Variable

Description

Takes UI input and tries to figure out if it's numeric or text

Usage

autocast(ui_input, quote_char = TRUE)

Value

Best guess of type casting applied to the ui_input

Arguments

ui_input

UI input from a shiny form

quote_char

TRUE will include double quotes in the character string

Examples

Run this code
number = autocast('10')
text   = autocast('ten')

Run the code above in your browser using DataLab