ParseText: Parse text into the appropriate type

View source: R/parsetext.R

ParseTextR Documentation

Parse text into the appropriate type

Description

Convert text into the specified type. This can be used with form.textBox. The return value is a single value. Use TextAsVector first if multiple entries separated by a comma (or other deliminator) is expected.

Usage

ParseText(x, same.as = NULL, type = "Automatic")

Arguments

x

The input character string to be converted.

same.as

A variable of the same class as the desired output. If this is supplied then class(same.as) will be used instead of type.

type

The desired type of the output. If set to "Automatic" (and same.as is not supplied) then numeric, POSIXct, Date, and character will be tried sequentially. However, if a specific type is specified, then NA will be returned if it cannot be appropriately parsed. Note that factors will be treated as characters


Displayr/flipTransformations documentation built on Feb. 26, 2024, 12:47 a.m.