Tools for Tensor Analysis and Decomposition
Overview
A set of tools for creation, manipulation, and modeling of tensors with arbitrary number of modes. A tensor in the context of data analysis is a multidimensional array. rTensor does this by providing a S4 class 'Tensor' that wraps around the base 'array' class. rTensor provides common tensor operations as methods, including matrix unfolding, summing/averaging across modes, calculating the Frobenius norm, and taking the inner product between two tensors. Familiar array operations are overloaded, such as index subsetting via '[' and element-wise operations. rTensor also implements various tensor decomposition, including CP, GLRAM, MPCA, PVD, Tucker, INDSCAL, RESCAL, DEDICOM, PARAFAC2, and 2DLDA. For tensors with 3 modes, rTensor also implements transpose, t-product, and t-SVD, as defined in Kilmer et al. (2013). Some auxiliary functions include the Khatri-Rao product, Kronecker product, and the Hadamard product for a list of matrices.
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK14 OK2026-03-10
Documentation
- Help pages
- 50includes a package overview page
- Examples that run
- 100%42 run in a plain check
- Exported functions with examples
- 85%
- Documented parameters
- 100%
- Return-value docs
- 82%
- Help pages citing references
- 50%
Downloads
Repository
Stars over time
Forks over time
Releases over time
3 development-tooling and community-health practices detected across 2 families in the upstream repository
Checks run against github.com/rikenbit/rtensor on 2026-10-18.
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-05-07Commits: at least 3 crediting it in the message
- Claude Opus 4.63 commits · May 2026
Dependencies
Installing rTensor adds no packages beyond those that come with R.
Show all 23 packagesHide all 23 packages
Code & Tests
People & History
Maintainer since 1.4.8 (2021), previously James Li (1.0 to 1.4.1)
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- unarchivedReturned to CRAN2021-05-15
- archivedRemoved from CRAN2021-05-05check problems were not corrected in time
- RR 4.0.0 released · 2020-04-24
- RR 3.6.0 released · 2019-04-26
- RR 3.5.0 released · 2018-04-23
- RR 3.4.0 released · 2017-04-21
- RR 3.3.0 released · 2016-05-03
- RR 3.2.0 released · 2015-04-16
- RR 3.1.0 released · 2014-04-10
- 3.0.3Latest2014-01-27 · current release · diff ↗ ·
added 19 exports
as.tensor, cp, cs_fold, fold, hamadard_list, hosvd, khatri_rao, khatri_rao_list, kronecker_list, mpca, pvd, rand_tensor, rs_fold, t_mult, t_svd, t_svd_reconstruct, ttl, ttm, tucker
Show 10 earlier eventsHide 10 earlier events
- 1.5.0
- 1.4.92025-08-25 · diff ↗
- 1.4.8
- 1.4.12020-03-22 · diff ↗
- 1.42018-12-04 · diff ↗
- 1.3
- 1.22014-11-11 · diff ↗ ·
added 13 exports
cs_unfold, fnorm, innerProd, k_fold, k_unfold, matvec, modeMean, modeSum, rs_unfold, tperm, unfold, unmatvec, vec - 1.12014-04-08 · diff ↗
- 1.02014-01-28
- RR 3.0.0 released · 2013-04-03
Package metadata
- First published
- 2014-01-27
- Total releases
- 10 / 12 yrs
- License
- MIT + file LICENSE OSI · relicensed from GPL (>= 2) in 1.4.9
- Minimum R
- ≥ 2.10.0
- Download size
- 43 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("rTensor")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.18637/jss.v087.i10.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-20, which the citation names so these numbers can be found later. More on citing and the projects behind them.