literal: Construct a literal

Description Usage Arguments Details Value See Also Examples

View source: R/literal.R

Description

literal constructs a literal object.

Usage

1
literal(text_value, xsd_type, lang)

Arguments

text_value

character The textual value of literal.

xsd_type

identifier The XSD type.

lang

character The language code.

Details

If for some reason the supplied text value is meaningless (empty string, just spaces, invalid type, etc.), the returned object is the equivalent of NA

Value

a literal object, which is a list with the following fields:

See Also

Other literal functions: is.literal, print.literal, represent.literal

Examples

1
2
3
4
5
6
7
8
9
lking_lear = literal(text_value = "King Lear", lang = "en")
lshakespeare = literal(text_value = "Shakespeare")
l1599 = literal(text_value = "1599", xsd_type = xsd_integer)

lking_lear
lshakespeare
l1599

# see vignette

vsenderov/rdf4r documentation built on May 3, 2019, 4:02 p.m.