MyNixOS website logo
Description

Interface to 'Geomstats'.

Provides an interface to the Python package 'Geomstats' authored by Miolane et al. (2020) <arXiv:2004.04667>.

rgeomstats

check-standard test-coverage Codecov testcoverage pkgdown CRANstatus

The goal of rgeomstats is to provide accessibility to the Geomstats Python library for the community of R users through an R interface that mimics as closely as possible the carefully designed Python API.

Installation

You can install the development version of rgeomstats via:

# install.packages("remotes")
remotes::install_github("LMJL-Alea/rgeomstats")

Example

You can instantiate the space $\mathrm{SO}(3)$ of 3D rotations and sample random points in this space as follows:

library(rgeomstats)
so3 <- SpecialOrthogonal(n = 3)
spl <- so3$random_point(n_samples = 5)
dim(spl)
#> [1] 5 3 3

All Geomstats-like computations are stored in arrays. In particular, sample IDs are always stored along the first dimension. Hence, it is always possible to convert a sample into a list via:

purrr::array_tree(spl, margin = 1)
#> [[1]]
#>             [,1]       [,2]      [,3]
#> [1,] -0.03532813 -0.9154660 0.4008416
#> [2,]  0.68066355  0.2716386 0.6803746
#> [3,] -0.73174384  0.2968746 0.6135278
#> 
#> [[2]]
#>            [,1]          [,2]      [,3]
#> [1,] -0.3117327 -0.8280555376 0.4659901
#> [2,]  0.8305219  0.0007836864 0.5569855
#> [3,] -0.4615801  0.5606455319 0.6874739
#> 
#> [[3]]
#>            [,1]        [,2]       [,3]
#> [1,] -0.7025064  0.66878384 -0.2433370
#> [2,] -0.3513459 -0.02856766  0.9358098
#> [3,]  0.6189029  0.74290785  0.2550434
#> 
#> [[4]]
#>            [,1]       [,2]       [,3]
#> [1,] -0.8970871 -0.2258339  0.3797811
#> [2,] -0.1157827 -0.7093377 -0.6952945
#> [3,]  0.4264141 -0.6677119  0.6101900
#> 
#> [[5]]
#>            [,1]       [,2]       [,3]
#> [1,] -0.3877247 -0.3760100 -0.8415973
#> [2,]  0.4484487 -0.8746292  0.1841673
#> [3,] -0.8053343 -0.3060069  0.5077366
Metadata

Version

0.0.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows