knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

paleotools

The goal of paleotools is to ...

Installation

You can install the development version of the package from GitHub with:

# install.packages("devtools")
devtools::install_github("mchevalier2/paleotools")

Example

This is a basic example which shows you how to use the Earth Movers' Distance (EMD) and the associated significance test.

library(paleotools)

EMD(1:5/sum(1:5), 6:10/sum(6:10))
EMD(1:5, 6:10) # The vectors are normalised by the function
m <- matrix(1:25, ncol=5)
for(i in 1:5) m[i,i] <- 0
EMD(1:5, 6:10, weight.m=m)
m1 <- matrix(abs(rnorm(500)), ncol=5) ; m1 <- m1 / apply(m1, 1, sum)
m2 <- matrix(abs(rnorm(500)), ncol=5) ; m2 <- m2 / apply(m2, 1, sum)
signif_struct(m1, m2, plot=FALSE)
res <- signif_struct(m1, m2, plot=TRUE, verbose=TRUE)
res <- signif_struct(m1, 1+m1, plot=TRUE, verbose=TRUE, nrep=100)
str(res)


mchevalier2/paleotools documentation built on Jan. 7, 2025, 3:37 a.m.