literal: Create literals

Description Usage Arguments Value Examples

View source: R/convert.R

Description

literal creates a literal from a value with escaped quotes for file writing and appends a datatype.

Usage

1
literal(string, datatype = "xsd:string", lang = NA, ...)

Arguments

string

The value to be converted into a literal.

datatype

The datatype of the literal. Defaults to xsd:string. Language tags are identified by @.

Value

A literal with escaped quotes and the datatype appended. If string is NA, NA is returned.

Examples

1
2
3
4
literal("example", datatype="xsd:string")
literal("example", datatype="@en")
literal(630.6, datatype="xsd:float")
literal(NA, datatype="xsd:integer")

rijpma/cower documentation built on March 11, 2020, 8:51 a.m.