Learn R Programming

rotations (version 0.1)

sum_dist: Sample distance

Description

Compute the sum of the $p^{th}$ order distances between Rs and S.

Usage

sum_dist(x, S = genR(0, space = class(x)),
    method = "projected", p = 1)

## S3 method for class 'SO3': sum_dist(x, S = id.SO3, method = "projected", p = 1)

## S3 method for class 'Q4': sum_dist(x, S = id.Q4, method = "projected", p = 1)

Arguments

x
$n\times p$ matrix where each row corresponds to a random rotation in matrix (p=9) or quaternion (p=4) form.
S
the individual matrix of interest, usually an estimate of the mean.
method
type of distance used method in "projected" or "intrinsic"
p
the order of the distances to compute.

Value

  • The sum of the pth order distance between each sample in Rs and S.

See Also

dist.SO3, dist.Q4

Examples

Run this code
Rs<-ruars(20,rvmises,kappa=10)
Sp<-mean(Rs)
sum_dist(Rs,S=Sp,p=2)

Run the code above in your browser using DataLab