Description
Tools for working with rotational data, including simulation from the most commonly used distributions on SO(3), methods for different Bayes, mean and median type estimators for the central orientation of a sample, confidence/credible regions for the central orientation based on those estimators and a novel visualization technique for rotation data. Most recently, functions to identify potentially discordant (outlying) values have been added. References: Bingham, Melissa A. and Nordman, Dan J. and Vardeman, Steve B. (2009), Bingham, Melissa A and Vardeman, Stephen B and Nordman, Daniel J (2009), Bingham, Melissa A and Nordman, Daniel J and Vardeman, Stephen B (2010), Leon, C.A. and Masse, J.C. and Rivest, L.P. (2006), Hartley, R and Aftab, K and Trumpf, J. (2011), Stanfill, Bryan and Genschel, Ulrike and Hofmann, Heike (2013), Maonton, Jonathan (2004), Mardia, KV and Jupp, PE (2000, ISBN:9780471953333), Rancourt, D. and Rivest, L.P. and Asselin, J. (2000), Chang, Ted and Rivest, Louis-Paul (2001), Fisher, Nicholas I. (1996, ISBN:0521568900).
Downloads
387
Last 30 days
10529th
1K
Last 90 days
4.7K
Last year
Trend: +58.6% (30d vs prior 30d)
CRAN Check Status
Show all 13 flavors
| Flavor | Status |
|---|---|
| r-devel-linux-x86_64-debian-clang | ERROR |
| r-devel-linux-x86_64-debian-gcc | ERROR |
| r-devel-linux-x86_64-fedora-clang | ERROR |
| r-devel-linux-x86_64-fedora-gcc | ERROR |
| r-devel-windows-x86_64 | ERROR |
| r-oldrel-macos-arm64 | OK |
| r-oldrel-macos-x86_64 | OK |
| r-oldrel-windows-x86_64 | ERROR |
| r-patched-linux-x86_64 | OK |
| r-release-linux-x86_64 | OK |
| r-release-macos-arm64 | OK |
| r-release-macos-x86_64 | OK |
| r-release-windows-x86_64 | OK |
Check details (11 non-OK)
examples
Running examples in ‘rotations-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: Q4
> ### Title: 'Q4' class for storing rotation data as quaternions
> ### Aliases: Q4 as.Q4 as.Q4.default as.Q4.SO3 as.Q4.Q4 as.Q4.data.frame
> ### is.Q4 id.Q4
> ### Keywords: datasets
>
> ### ** Examples
>
> # Pull off subject 1's wrist measurements
> Subj1Wrist <- subset(drill, Subject == '1' & Joint == 'Wrist')
>
> ## The measurements are in columns 5:8
> all(is.Q4(Subj1Wrist[,5:8])) #TRUE, even though Qs is a data.frame, the rows satisfy the
[1] TRUE
> #conditions necessary to be quaternions BUT,
> #S3 methods (e.g. 'mean' or 'plot') for objects of class
> #'Q4' will not work until 'as.Q4' is used
>
> Qs <- as.Q4(Subj1Wrist[,5:8]) #Coerce measurements into 'Q4' type using as.Q4.data.frame
> all(is.Q4(Qs)) #TRUE
Error in x[i, ...] : subscript out of bounds
Calls: is.Q4 -> apply -> [ -> [.Q4
Execution halted
tests
Running ‘test-all.R’ [3s/4s]
Running the tests in ‘tests/test-all.R’ failed.
Complete output:
> library(testthat)
> test_check("rotations")
Loading required package: rotations
Saving _problems/test_conversions-10.R
[ FAIL 1 | WARN 2 | SKIP 0 | PASS 51 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test_conversions.R:10:1'): (code run outside of `test_that()`) ────
Expected `is.Q4(as.Q4(u, r))` to be TRUE.
Differences:
`actual`: FALSE
`expected`: TRUE
[ FAIL 1 | WARN 2 | SKIP 0 | PASS 51 ]
Error:
! Test failures.
Execution halted
examples
Running examples in ‘rotations-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: Q4
> ### Title: 'Q4' class for storing rotation data as quaternions
> ### Aliases: Q4 as.Q4 as.Q4.default as.Q4.SO3 as.Q4.Q4 as.Q4.data.frame
> ### is.Q4 id.Q4
> ### Keywords: datasets
>
> ### ** Examples
>
> # Pull off subject 1's wrist measurements
> Subj1Wrist <- subset(drill, Subject == '1' & Joint == 'Wrist')
>
> ## The measurements are in columns 5:8
> all(is.Q4(Subj1Wrist[,5:8])) #TRUE, even though Qs is a data.frame, the rows satisfy the
[1] TRUE
> #conditions necessary to be quaternions BUT,
> #S3 methods (e.g. 'mean' or 'plot') for objects of class
> #'Q4' will not work until 'as.Q4' is used
>
> Qs <- as.Q4(Subj1Wrist[,5:8]) #Coerce measurements into 'Q4' type using as.Q4.data.frame
> all(is.Q4(Qs)) #TRUE
Error in x[i, ...] : subscript out of bounds
Calls: is.Q4 -> apply -> [ -> [.Q4
Execution halted
tests
Running ‘test-all.R’ [2s/2s]
Running the tests in ‘tests/test-all.R’ failed.
Complete output:
> library(testthat)
> test_check("rotations")
Loading required package: rotations
Saving _problems/test_conversions-10.R
[ FAIL 1 | WARN 2 | SKIP 0 | PASS 51 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test_conversions.R:10:1'): (code run outside of `test_that()`) ────
Expected `is.Q4(as.Q4(u, r))` to be TRUE.
Differences:
`actual`: FALSE
`expected`: TRUE
[ FAIL 1 | WARN 2 | SKIP 0 | PASS 51 ]
Error:
! Test failures.
Execution halted
examples
Running examples in ‘rotations-Ex.R’ failed The error most likely occurred in: > ### Name: Q4 > ### Title: 'Q4' class for storing rotation data as quaternions > ### Aliases: Q4 as.Q4 as.Q4.default as.Q4.SO3 as.Q4.Q4 as.Q4.data.frame > ### is.Q4 id.Q4 > ### Keywords: datasets > > ### ** Examples > > # Pull off subject 1's wrist measurements > Subj1Wrist <- subset(drill, Subject == '1' & Joint == 'Wrist') > > ## The measurements are in columns 5:8 > all(is.Q4(Subj1Wrist[,5:8])) #TRUE, even though Qs is a data.frame, the rows satisfy the [1] TRUE > #conditions necessary to be quaternions BUT, > #S3 methods (e.g. 'mean' or 'plot') for objects of class > #'Q4' will not work until 'as.Q4' is used > > Qs <- as.Q4(Subj1Wrist[,5:8]) #Coerce measurements into 'Q4' type using as.Q4.data.frame > all(is.Q4(Qs)) #TRUE Error in x[i, ...] : subscript out of bounds Calls: is.Q4 -> apply -> [ -> [.Q4 Execution halted
tests
Running ‘test-all.R’ [4s/586s]
Running the tests in ‘tests/test-all.R’ failed.
Complete output:
> library(testthat)
> test_check("rotations")
Loading required package: rotations
Saving _problems/test_conversions-10.R
[ FAIL 1 | WARN 2 | SKIP 0 | PASS 51 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test_conversions.R:10:1'): (code run outside of `test_that()`) ────
Expected `is.Q4(as.Q4(u, r))` to be TRUE.
Differences:
`actual`: FALSE
`expected`: TRUE
[ FAIL 1 | WARN 2 | SKIP 0 | PASS 51 ]
Error:
! Test failures.
Execution halted
examples
Running examples in ‘rotations-Ex.R’ failed The error most likely occurred in: > ### Name: Q4 > ### Title: 'Q4' class for storing rotation data as quaternions > ### Aliases: Q4 as.Q4 as.Q4.default as.Q4.SO3 as.Q4.Q4 as.Q4.data.frame > ### is.Q4 id.Q4 > ### Keywords: datasets > > ### ** Examples > > # Pull off subject 1's wrist measurements > Subj1Wrist <- subset(drill, Subject == '1' & Joint == 'Wrist') > > ## The measurements are in columns 5:8 > all(is.Q4(Subj1Wrist[,5:8])) #TRUE, even though Qs is a data.frame, the rows satisfy the [1] TRUE > #conditions necessary to be quaternions BUT, > #S3 methods (e.g. 'mean' or 'plot') for objects of class > #'Q4' will not work until 'as.Q4' is used > > Qs <- as.Q4(Subj1Wrist[,5:8]) #Coerce measurements into 'Q4' type using as.Q4.data.frame > all(is.Q4(Qs)) #TRUE Error in x[i, ...] : subscript out of bounds Calls: is.Q4 -> apply -> [ -> [.Q4 Execution halted
tests
Running ‘test-all.R’
Running the tests in ‘tests/test-all.R’ failed.
Complete output:
> library(testthat)
> test_check("rotations")
Loading required package: rotations
Saving _problems/test_conversions-10.R
[ FAIL 1 | WARN 2 | SKIP 0 | PASS 51 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test_conversions.R:10:1'): (code run outside of `test_that()`) ────
Expected `is.Q4(as.Q4(u, r))` to be TRUE.
Differences:
`actual`: FALSE
`expected`: TRUE
[ FAIL 1 | WARN 2 | SKIP 0 | PASS 51 ]
Error:
! Test failures.
Execution halted
examples
Running examples in 'rotations-Ex.R' failed The error most likely occurred in: > ### Name: Q4 > ### Title: 'Q4' class for storing rotation data as quaternions > ### Aliases: Q4 as.Q4 as.Q4.default as.Q4.SO3 as.Q4.Q4 as.Q4.data.frame > ### is.Q4 id.Q4 > ### Keywords: datasets > > ### ** Examples > > # Pull off subject 1's wrist measurements > Subj1Wrist <- subset(drill, Subject == '1' & Joint == 'Wrist') > > ## The measurements are in columns 5:8 > all(is.Q4(Subj1Wrist[,5:8])) #TRUE, even though Qs is a data.frame, the rows satisfy the [1] TRUE > #conditions necessary to be quaternions BUT, > #S3 methods (e.g. 'mean' or 'plot') for objects of class > #'Q4' will not work until 'as.Q4' is used > > Qs <- as.Q4(Subj1Wrist[,5:8]) #Coerce measurements into 'Q4' type using as.Q4.data.frame > all(is.Q4(Qs)) #TRUE Error in x[i, ...] : subscript out of bounds Calls: is.Q4 -> apply -> [ -> [.Q4 Execution halted
tests
Running 'test-all.R' [3s]
Running the tests in 'tests/test-all.R' failed.
Complete output:
> library(testthat)
> test_check("rotations")
Loading required package: rotations
Saving _problems/test_conversions-10.R
[ FAIL 1 | WARN 0 | SKIP 0 | PASS 51 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test_conversions.R:10:1'): (code run outside of `test_that()`) ────
Expected `is.Q4(as.Q4(u, r))` to be TRUE.
Differences:
`actual`: FALSE
`expected`: TRUE
[ FAIL 1 | WARN 0 | SKIP 0 | PASS 51 ]
Error:
! Test failures.
Execution halted
tests
Running 'test-all.R' [3s]
Running the tests in 'tests/test-all.R' failed.
Complete output:
> library(testthat)
> test_check("rotations")
Loading required package: rotations
Saving _problems/test_estimators-21.R
Saving _problems/test_estimators-22.R
Saving _problems/test_estimators-23.R
Saving _problems/test_estimators-24.R
Saving _problems/test_estimators-26.R
Saving _problems/test_estimators-27.R
Saving _problems/test_estimators-28.R
Saving _problems/test_estimators-29.R
[ FAIL 8 | WARN 0 | SKIP 0 | PASS 44 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test_estimators.R:21:1'): (code run outside of `test_that()`) ─────
Expected `mean(Qs)` to equal `as.Q4(mean(Rs))`.
Differences:
Mean relative difference: 5.218084e-07
── Failure ('test_estimators.R:22:1'): (code run outside of `test_that()`) ─────
Expected `mean(Qs, type = "geometric")` to equal `as.Q4(mean(Rs, type = "geometric"))`.
Difference
...[truncated]...
tors.R:26:1'): (code run outside of `test_that()`) ─────
Expected `as.SO3(matrix(as.SO3(mean(Qs)), 3, 3))` to equal `mean(Rs)`.
Differences:
Mean relative difference: 6.942713e-07
── Failure ('test_estimators.R:27:1'): (code run outside of `test_that()`) ─────
Expected `as.SO3(matrix(as.SO3(mean(Qs, type = "geometric")), 3, 3))` to equal `mean(Rs, type = "geometric")`.
Differences:
Mean relative difference: 4.325217e-07
── Failure ('test_estimators.R:28:1'): (code run outside of `test_that()`) ─────
Expected `as.SO3(matrix(as.SO3(median(Qs)), 3, 3))` to equal `median(Rs)`.
Differences:
Mean relative difference: 4.958146e-07
── Failure ('test_estimators.R:29:1'): (code run outside of `test_that()`) ─────
Expected `as.SO3(matrix(as.SO3(median(Qs, type = "geometric")), 3, 3))` to equal `median(Rs, type = "geometric")`.
Differences:
Mean relative difference: 1.332558e-06
[ FAIL 8 | WARN 0 | SKIP 0 | PASS 44 ]
Error:
! Test failures.
Execution halted
Check History
ERROR 11 OK · 0 NOTE · 0 WARNING · 2 ERROR · 0 FAILURE Jun 19, 2026
examples
Running examples in ‘rotations-Ex.R’ failed The error most likely occurred in: > ### Name: Q4 > ### Title: 'Q4' class for storing rotation data as quaternions > ### Aliases: Q4 as.Q4 as.Q4.default as.Q4.SO3 as.Q4.Q4 as.Q4.data.frame > ### is.Q4 id ...[truncated]... til 'as.Q4' is used > > Qs <- as.Q4(Subj1Wrist[,5:8]) #Coerce measurements into 'Q4' type using as.Q4.data.frame > all(is.Q4(Qs)) #TRUE Error in x[i, ...] : subscript out of bounds Calls: is.Q4 -> apply -> [ -> [.Q4 Execution halted
examples
Running examples in ‘rotations-Ex.R’ failed The error most likely occurred in: > ### Name: Q4 > ### Title: 'Q4' class for storing rotation data as quaternions > ### Aliases: Q4 as.Q4 as.Q4.default as.Q4.SO3 as.Q4.Q4 as.Q4.data.frame > ### is.Q4 id ...[truncated]... til 'as.Q4' is used > > Qs <- as.Q4(Subj1Wrist[,5:8]) #Coerce measurements into 'Q4' type using as.Q4.data.frame > all(is.Q4(Qs)) #TRUE Error in x[i, ...] : subscript out of bounds Calls: is.Q4 -> apply -> [ -> [.Q4 Execution halted
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 13, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 4, 2026
examples
Running examples in ‘rotations-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: Q4
> ### Title: 'Q4' class for storing rotation data as quaternions
> ### Aliases: Q4 as.Q4 as.Q4.de
...[truncated]...
til 'as.Q4' is used
>
> Qs <- as.Q4(Subj1Wrist[,5:8]) #Coerce measurements into 'Q4' type using as.Q4.data.frame
> all(is.Q4(Qs)) #TRUE
Error in x[i, ...] : subscript out of bounds
Calls: is.Q4 -> apply -> [ -> [.Q4
Execution halted
OK 12 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 25, 2026
ERROR 10 OK · 3 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Apr 18, 2026
whether package can be installed
Installation failed. See 'd:/Rcompile/CRANpkg/local/4.6/rotations.Rcheck/00install.out' for details.
installed package size
installed size is 11.5Mb
sub-directories of 1Mb or more:
R 2.5Mb
data 2.7Mb
libs 5.7Mb
installed package size
installed size is 11.0Mb
sub-directories of 1Mb or more:
R 2.1Mb
data 2.7Mb
libs 5.5Mb
installed package size
installed size is 6.4Mb
sub-directories of 1Mb or more:
R 1.6Mb
data 2.7Mb
libs 1.4Mb
NOTE 11 OK · 3 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026
installed package size
installed size is 11.5Mb
sub-directories of 1Mb or more:
R 2.5Mb
data 2.7Mb
libs 5.7Mb
installed package size
installed size is 11.0Mb
sub-directories of 1Mb or more:
R 2.1Mb
data 2.7Mb
libs 5.5Mb
installed package size
installed size is 6.4Mb
sub-directories of 1Mb or more:
R 1.6Mb
data 2.7Mb
libs 1.4Mb