resource: 'resource' vector

View source: R/resource.r

resourceR Documentation

resource vector

Description

A vector of RDF resources with descriptions held in an orthogonal table.

Usage

resource(
  uri = character(),
  description = data.frame(uri = unique(uri)),
  fill_missing = FALSE
)

is_resource(x)

Arguments

uri

A character vector of URIs

description

A data frame of descriptions (must have a uri column)

fill_missing

A boolean specifying whether rows be added to the description for missing URIs (defaults to FALSE)

x

Any vector

Value

An S3 vector of class ldf_resource.

Examples

resource("http://example.net")

uris <- c("http://example.net/id/apple",
          "http://example.net/id/banana",
          "http://example.net/id/carrot")
labels <- c("Apple","Banana","Carrot")
description <- data.frame(uri=uris, label=labels)
r <- resource(uris, description)

Swirrl/linked-data-frames documentation built on Sept. 14, 2022, 6:15 p.m.