RDFTensor (version 1.3)

getTensor: getting tensor from triples

Description

gets a tensor data structure as a set of frontal slices represented as sparse matrices. The entities have the same id as subject and/or object.

Usage

getTensor(trp, SO = NULL, P = NULL)

Arguments

trp

three columns representing the set of triples (subject, predicate, object). Each row representes one triple.

SO

the predifined list of entities

P

The set of predicates

Value

A LIST containing:

X

set of sparse matrices with ones in the position of triples, each sparse matix represents one predicate (relationship)

SO

the set of entities in the subject and object domains

P

the set of predicates