types.castInteger {tableschema.r} | R Documentation |
Cast integer
Description
Cast integer. Integer values are indicated in the standard way for any valid integer.
Usage
types.castInteger(
format,
value,
options = {
}
)
Arguments
format |
no options (other than the default) |
value |
integer to cast |
options |
named list set bareNumber |
Details
bareNumber is a boolean field with a default of TRUE
. If TRUE
the physical contents of this field must follow
the formatting constraints already set out. If FALSE
the contents of this field may contain leading
and or trailing non-numeric characters (which implementors MUST therefore strip).
The purpose of bareNumber
is to allow publishers to publish numeric data that contains trailing characters such as percentages
e.g. 95
if anything, they do with stripped text.
See Also
Types and formats specifications
Examples
types.castInteger(format = "default", value = 1)
types.castInteger(format = "default", value = "1")
# cast trailing non numeric character
types.castInteger(format = "default", value = "1$", options = list(bareNumber = FALSE))
[Package tableschema.r version 1.1.2 Index]