The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
This package is currently experimental. This means that it is functional, but interfaces and functionalities may change over time, testing and documentation may be lacking.
Exploration and analysis of compositional data in the framework of J. Aitchison (1986). nexus provides tools for chemical fingerprinting and source tracking of ancient materials. This package provides methods for compositional data analysis:
transform_lr()
,
transform_clr()
, transform_alr()
,
transform_ilr()
, transform_plr()
.detect_outlier()
.This package also includes methods for provenance studies:
pca()
.mix()
.isopleuros is a companion package to nexus that allows to create ternary plots.
To cite nexus in publications use:
Frerebeau N, Philippe A (2025). nexus: Sourcing Archaeological Materials by Chemical Composition. Université Bordeaux Montaigne, Pessac, France. doi:10.5281/zenodo.10225630 https://doi.org/10.5281/zenodo.10225630, R package version 0.5.0, https://packages.tesselle.org/nexus/.
This package is a part of the tesselle project https://www.tesselle.org.
You can install the released version of nexus from CRAN with:
install.packages("nexus")
And the development version from Codeberg with:
# install.packages("remotes")
::install_git("https://codeberg.org/tesselle/nexus") remotes
## Install extra packages (if needed)
# install.packages("folio")
## Load the package
library(nexus)
#> Loading required package: dimensio
nexus provides a set of S4 classes that represent
different special types of matrix (see vignette("nexus")
).
The most basic class represents a compositional data matrix,
i.e. quantitative (nonnegative) descriptions of the parts of some whole,
carrying relative, rather than absolute, information (J. Aitchison
1986).
It assumes that you keep your data tidy: each variable must be saved in its own column and each observation (sample) must be saved in its own row.
## Data from Wood and Liu 2023
data("bronze", package = "folio")
## Coerce to compositional data
<- as_composition(bronze, parts = 4:11)
coda
## Use dynasties as groups
<- group(coda, by = bronze$dynasty) coda
## Select major elements
<- coda[, is_element_major(coda)]
major
## Compositional barplot
barplot(major, order_rows = "Cu", names = FALSE, border = NA, space = 0)
## Log-ratio analysis
## (PCA of centered log-ratio; outliers should be removed first)
<- transform_clr(coda, weights = TRUE)
clr <- pca(clr)
lra
## Visualize results
viz_individuals(
x = lra,
extra_quali = group_names(clr),
color = c("#004488", "#DDAA33", "#BB5566"),
hull = TRUE
)
viz_variables(lra)
This package provides translations of user-facing communications,
like messages, warnings and errors, and graphical elements (axis
labels). The preferred language is by default taken from the locale.
This can be overridden by setting of the environment variable
LANGUAGE
(you only need to do this once per session):
Sys.setenv(LANGUAGE = "<language code>")
Languages currently available are English (en
) and
French (fr
).
Please note that the nexus project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.