Learn R Programming

RiemBase (version 0.1.0)

riemfactory: Prepare a S3 Class Object 'riemdata'

Description

Most of the functions for RiemBase package require data to be wrapped as a riemdata class. Since manifolds of interests endow data points with specific constraints, the function riemfactory first checks the requirements to characterize the manifold and then wraps the data into riemdata class, which is simply a list of manifold-valued data and the name of manifold.

Usage

riemfactory(data, name = c("Euclidean", "Grassmann", "SPD", "Sphere",
  "Stiefel"))

Arguments

data

data to be wrapped as riemdata class. Following input formats are considered,

2D array

an \((m\times p)\) matrix where data are stacked in columns over 2nd dimension. Appropriate for vector-valued Euclidean or Sphere manifold case.

3D array

an \((m\times n\times p)\) matrix where data are stacked in slices over 3rd dimension.

list

unnamed list where each element of the list is a single data point. Sizes of all elements must match.

name

the name of Riemmanian manifold for data to which data belong.

Value

a named riemdata S3 object containing

data

a list of manifold-valued data points.

size

size of each data matrix.

name

name of the manifold of interests.

Examples

Run this code
# NOT RUN {
### Here
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab