-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
53 lines (39 loc) · 1.98 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# rgeomstats <a href="https://lmjl-alea.github.io/rgeomstats/"><img src="man/figures/logo.png" align="right" height="138" /></a>
<!-- badges: start -->
[![R-CMD-check](https://github.com/LMJL-Alea/rgeomstats/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/LMJL-Alea/rgeomstats/actions/workflows/R-CMD-check.yaml)
[![test-coverage](https://github.com/LMJL-Alea/rgeomstats/workflows/test-coverage/badge.svg)](https://github.com/LMJL-Alea/rgeomstats/actions)
[![Codecov test coverage](https://codecov.io/gh/LMJL-Alea/rgeomstats/graph/badge.svg)](https://app.codecov.io/gh/LMJL-Alea/rgeomstats)
[![pkgdown](https://github.com/LMJL-Alea/rgeomstats/workflows/pkgdown/badge.svg)](https://github.com/LMJL-Alea/rgeomstats/actions)
[![CRAN status](https://www.r-pkg.org/badges/version/rgeomstats)](https://CRAN.R-project.org/package=rgeomstats)
<!-- badges: end -->
The goal of **rgeomstats** is to provide accessibility to the [**Geomstats**](https://geomstats.github.io) 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:
``` r
# 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:
```{r}
library(rgeomstats)
so3 <- SpecialOrthogonal(n = 3)
spl <- so3$random_point(n_samples = 5)
dim(spl)
```
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:
```{r}
purrr::array_tree(spl, margin = 1)
```