Skip to content
This repository has been archived by the owner on Jan 30, 2025. It is now read-only.

Commit

Permalink
Fix imports from dimensio and arkhe
Browse files Browse the repository at this point in the history
  • Loading branch information
nfrerebeau committed Feb 23, 2024
1 parent db241f4 commit b1ef507
Show file tree
Hide file tree
Showing 11 changed files with 74 additions and 38 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ URL: https://packages.tesselle.org/kairos/,
https://github.com/tesselle/kairos
BugReports: https://github.com/tesselle/kairos/issues
Depends:
R (>= 3.5)
R (>= 3.5),
dimensio (>= 0.6.0)
Imports:
aion (>= 1.0.2),
arkhe (>= 1.5.0),
dimensio (>= 0.5.0),
arkhe (>= 1.6.0),
extraDistr,
grDevices,
methods,
Expand Down
17 changes: 7 additions & 10 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ export(BCE)
export(BP)
export(CE)
export(b2k)
export(bootstrap)
export(calendar)
export(jackknife)
export(remove_NA)
export(remove_constant)
export(remove_zero)
export(replace_NA)
export(replace_zero)
Expand Down Expand Up @@ -66,6 +65,9 @@ exportMethods(time)
exportMethods(weights)
import(aion)
import(arkhe)
importClassesFrom(aion,RataDie)
importClassesFrom(aion,TimeSeries)
importClassesFrom(dimensio,CA)
importFrom(aion,AD)
importFrom(aion,BC)
importFrom(aion,BCE)
Expand All @@ -77,18 +79,11 @@ importFrom(aion,end)
importFrom(aion,start)
importFrom(aion,time)
importFrom(aion,year_axis)
importFrom(arkhe,bootstrap)
importFrom(arkhe,jackknife)
importFrom(arkhe,remove_NA)
importFrom(arkhe,remove_constant)
importFrom(arkhe,remove_zero)
importFrom(arkhe,replace_NA)
importFrom(arkhe,replace_zero)
importFrom(dimensio,ca)
importFrom(dimensio,get_coordinates)
importFrom(dimensio,get_data)
importFrom(dimensio,get_eigenvalues)
importFrom(dimensio,get_replications)
importFrom(dimensio,predict)
importFrom(extraDistr,ptnorm)
importFrom(grDevices,xy.coords)
importFrom(methods,.valueClassTest)
Expand All @@ -100,3 +95,5 @@ importFrom(methods,setClass)
importFrom(methods,setGeneric)
importFrom(methods,setMethod)
importFrom(methods,validObject)
importMethodsFrom(arkhe,bootstrap)
importMethodsFrom(arkhe,jackknife)
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# kairos 2.0.2.9000
## Internals
* List **dimensio** in `Depends`.

# kairos 2.0.2
## Internals
Expand Down
10 changes: 8 additions & 2 deletions R/AllClasses.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# CLASSES DEFINITION AND INITIALIZATION
NULL

# MeanDate ======================================================================
# Import classes ===============================================================
#' @importClassesFrom aion TimeSeries
#' @importClassesFrom aion RataDie
#' @importClassesFrom dimensio CA
NULL

# MeanDate =====================================================================
#' Mean Date
#'
#' An S4 class to store the weighted mean date (e.g. Mean Ceramic Date) of
Expand Down Expand Up @@ -141,7 +147,7 @@ NULL
contains = "TimeSeries"
)

# CountApportion ==================================================================
# CountApportion ===============================================================
#' Count Apportioning
#'
#' An S4 class to represent an artifact apportioning results. Gives the
Expand Down
7 changes: 4 additions & 3 deletions R/AllGenerics.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
#' @include AllClasses.R
NULL

# S4 dispatch to S3 generics ===================================================
setGeneric("jackknife", package = "arkhe")
setGeneric("bootstrap", package = "arkhe")
# Import S4 generics ===========================================================
#' @importMethodsFrom arkhe jackknife
#' @importMethodsFrom arkhe bootstrap
NULL

# Mutators =====================================================================
## Subset ----------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions R/kairos-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#' `kairos` uses the following [options()] to configure behavior:
#' * `kairos.progress`: a [`logical`] scalar. Should progress bars be
#' displayed?
#' * `kairos.calendar`: a [`aion::TimeScale-class`] object (default calendar
#' for printing).
#'
#' @author
#' **Full list of authors and contributors** (alphabetic order)
Expand Down Expand Up @@ -39,8 +41,6 @@

#' @import arkhe
#' @import aion
#' @importFrom dimensio ca get_coordinates get_data get_eigenvalues
#' get_replications predict
#' @importFrom extraDistr ptnorm
#' @importFrom grDevices xy.coords
#' @importFrom methods as callGeneric callNextMethod new setClass setGeneric
Expand Down
12 changes: 4 additions & 8 deletions R/reexport.R
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# REEXPORT FROM ARKHE

#' @importFrom arkhe bootstrap
#' @export
arkhe::bootstrap

#' @importFrom arkhe jackknife
#' @export
arkhe::jackknife

#' @importFrom arkhe replace_NA
#' @export
arkhe::replace_NA
Expand All @@ -24,6 +16,10 @@ arkhe::remove_NA
#' @export
arkhe::remove_zero

#' @importFrom arkhe remove_constant
#' @export
arkhe::remove_constant

#' @importFrom aion calendar
#' @export
aion::calendar
Expand Down
2 changes: 2 additions & 0 deletions man/kairos-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions man/reexports.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions paper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: 'kairos: An R Package for the Analysis of Chronological Patterns from Archaeological Count Data'
tags:
- archaeology
- time series
- chronology
authors:
- name: Nicolas Frerebeau
orcid: 0000-0001-5759-4944
affiliation: 1
affiliations:
- name: UMR 6034 Archéosciences Bordeaux (CNRS, Université Bordeaux Montaigne, Université de Bordeaux, EPHE)
index: 1
date: 27 November 2023
bibliography: paper.bib
---

# Summary

# Statement of need

# Functionality

A toolkit for absolute and relative dating and analysis of
chronological patterns. This package includes functions for
chronological modeling and dating of archaeological assemblages from
count data. It provides methods for matrix seriation. It also allows
to compute time point estimates and density estimates of the
occupation and duration of an archaeological site.

# Acknowledgements

# References
12 changes: 6 additions & 6 deletions vignettes/seriation.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ tabula::plot_ford(zuni)
(zun_indices <- seriate_average(zuni, margin = c(1, 2)))
## Plot CA results
dimensio::biplot(zun_indices)
biplot(zun_indices)
```

```{r ca-permutation, fig.width=7, fig.height=7}
Expand All @@ -142,17 +142,17 @@ According to @peeples2012, "[this] point removal procedure [results in] a reduce
```{r bootstrap, fig.width=7, fig.height=7, out.width='50%', fig.show='hold'}
## Partial bootstrap CA
## Warning: this may take a few seconds!
zuni_boot <- dimensio::bootstrap(zun_indices, n = 30)
zuni_boot <- bootstrap(zun_indices, n = 30)
## Bootstrap CA results for the rows
## (add convex hull)
zuni_boot |>
dimensio::viz_rows(col = "lightgrey", pch = 16, legend = NULL) |>
dimensio::viz_hull(col = adjustcolor("#004488", alpha = 0.2))
viz_rows(col = "lightgrey", pch = 16, legend = NULL) |>
viz_hull(col = adjustcolor("#004488", alpha = 0.2))
## Bootstrap CA results for the columns
zuni_boot |>
dimensio::viz_columns(pch = 16, legend = list(x = "topright"))
viz_columns(pch = 16, legend = list(x = "topright"))
```

```{r refine, fig.width=7, fig.height=7}
Expand All @@ -164,7 +164,7 @@ fun <- function(x) { mean(x) + sd(x) }
(zuni_refine <- seriate_refine(zun_indices, cutoff = fun, margin = 1))
## Plot CA results for the rows
dimensio::viz_rows(zuni_refine, highlight = "observation", pch = c(16, 15))
viz_rows(zuni_refine, highlight = "observation", pch = c(16, 15))
```

```{r refine-histogram, fig.width=5, fig.height=5}
Expand Down

0 comments on commit b1ef507

Please sign in to comment.