Learn R Programming

tableschema.r (version 1.1.2)

types.castString: Cast string

Description

Cast string that is, sequences of characters.

Usage

types.castString(format, value)

Arguments

format

available options are "default", "email", "uri", "binary" and "uuid", where

default

Any valid string.

email

A valid email address.

uri

A valid URI.

binary

A base64 encoded string representing binary data.

uuid

A string that is a uuid.

value

string to cast

See Also

Examples

Run this code

# cast any string
types.castString(format = "default", value = "string")

# cast email
types.castString(format = "email", value = "name@gmail.com")
# \dontshow{
# cast uri
types.castString(format = "uri", value = "http://google.com")
# }
# cast binary
types.castString(format = "binary", value = "dGVzdA==")

# cast uuid
types.castString(format = "uuid", value = "95ecc380-afe9-11e4-9b6c-751b66dd541e")

Run the code above in your browser using DataLab