Skip to content

Commit

Permalink
version 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Anne Le Maitre authored and cran-robot committed Mar 21, 2024
1 parent 9f222e9 commit d40723d
Show file tree
Hide file tree
Showing 19 changed files with 1,208 additions and 617 deletions.
10 changes: 5 additions & 5 deletions DESCRIPTION
@@ -1,12 +1,12 @@
Package: prWarp
Title: Warping Landmark Configurations
Version: 1.0.0
Version: 1.0.1
Authors@R: c(
person("Anne", "Le Maitre", email = "anne.le.maitre@univie.ac.at", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-2690-7367")),
person("Silvester", "Bartsch", email = "silvester.bartsch@univie.ac.at", role = "aut"),
person("Nicole", "Grunstra", email = "nicolegrunstra@googlemail.com", role = "aut"),
person("Philipp", "Mitteroecker", email = "philipp.mitteroecker@univie.ac.at", role = "aut"))
Date: 2020-10-07
Date: 2024-03-19
Description: Compute bending energies, principal warps, partial warp scores, and the non-affine component of shape variation for 2D landmark configurations, as well as Mardia-Dryden distributions and self-similar distributions of landmarks, as described in Mitteroecker et al. (2020) <doi:10.1093/sysbio/syaa007>. Working examples to decompose shape variation into small-scale and large-scale components, and to decompose the total shape variation into outline and residual shape components are provided. Two landmark datasets are provided, that quantify skull morphology in humans and papionin primates, respectively from Mitteroecker et al. (2020) <doi:10.5061/dryad.j6q573n8s> and Grunstra et al. (2020) <doi:10.5061/dryad.zkh189373>.
Depends: R (>= 3.6.0)
Imports: Morpho
Expand All @@ -15,13 +15,13 @@ Encoding: UTF-8
LazyData: true
Suggests: knitr, rmarkdown, geomorph
VignetteBuilder: knitr
RoxygenNote: 7.1.1
RoxygenNote: 7.3.1
NeedsCompilation: no
Packaged: 2020-10-22 15:46:34 UTC; lemaitre
Packaged: 2024-03-20 17:30:06 UTC; Anne
Author: Anne Le Maitre [aut, cre] (<https://orcid.org/0000-0003-2690-7367>),
Silvester Bartsch [aut],
Nicole Grunstra [aut],
Philipp Mitteroecker [aut]
Maintainer: Anne Le Maitre <anne.le.maitre@univie.ac.at>
Repository: CRAN
Date/Publication: 2020-11-02 08:40:02 UTC
Date/Publication: 2024-03-20 18:00:02 UTC
35 changes: 18 additions & 17 deletions MD5
@@ -1,30 +1,31 @@
4febe4f84d3951ace483dd42e318cf25 *DESCRIPTION
d46b4d88f8b82b965235148cbde3680c *DESCRIPTION
2a938af0f48840a86ba70f5b994b4551 *NAMESPACE
e753c8dd1c47c87674264b7a64b681f2 *R/HomoMidSag-dataset.R
3979f77465becd35907c9bf1623e164a *NEWS
e6fb42167f2d77c814de6af792e16081 *R/HomoMidSag-dataset.R
97a01061f7071e7ee35916b020ce6971 *R/array.to.xxyy.R
33ba4788f6ce75e7eaa288b808c5ae8d *R/create.pw.be.R
f028d8cb219fa80bcadd8723c35801c6 *R/md.distri.R
62afe0a0e47a0fc7e1acd9867a78c3d7 *R/papionin-dataset.R
02385b005963791915c9162b25f905e1 *R/papionin-dataset.R
44c808b5840e586e94c01dc093b1ca51 *R/ssim.distri.R
b6aacbae966366623b9f05dae2c54c1a *R/tps.all.R
720136dd95ba4078f1925db2dd1fd9f4 *R/tps.all.R
200981e0046f15d421d9df93a3a69486 *R/xxyy.to.array.R
f519e8b9dc90bf78c5cbfb3cd0f539a2 *build/vignette.rds
1533a0034e3f603dbfa8d9fed9995da8 *build/vignette.rds
0093899f573dff859dc3dbab4c38a90e *data/HomoMidSag.rda
39807235a4b8fbbd530322c887482608 *data/papionin.rda
ae559ba62ed43a8142c70bd179fb76e1 *inst/CITATION
3977b116505926d51c917c6b25159377 *inst/doc/prWarp-homo-example.R
32aba465cd587707f478d55cbd682021 *inst/doc/prWarp-homo-example.Rmd
a7f191028ffd15e4eb25754e8ba844eb *inst/doc/prWarp-homo-example.html
f3b692cb55c28c9b289c5409e4487c0b *inst/doc/prWarp-papionin-example.R
364f4b587329927704d134dc5394974d *inst/doc/prWarp-papionin-example.Rmd
07801d47bb4ccbf88525dc0353df5ebf *inst/doc/prWarp-papionin-example.html
fdd67833cbb0edabf10c227e47bbf58e *man/HomoMidSag.Rd
97afe44dc6d5c287cbb3cf3a3c92e521 *inst/CITATION
90cde8753ef0edd60fbe5b64dc5eb71f *inst/doc/prWarp-homo-example.R
fe66cbdee6425636e4999d0af688bb78 *inst/doc/prWarp-homo-example.Rmd
1e031a2519e90d80638216a6eac2e8f0 *inst/doc/prWarp-homo-example.html
fe3051d7f346fcbf32050fa7eecb07f0 *inst/doc/prWarp-papionin-example.R
d743e2a701eed21092f34cdb137e91fb *inst/doc/prWarp-papionin-example.Rmd
271acdace9f45e23c7d7fd6751378930 *inst/doc/prWarp-papionin-example.html
14d095aa3e0a1b237d82c47c58ba65c8 *man/HomoMidSag.Rd
6438385df01d4a8666eb2152e4dd8d3c *man/array.to.xxyy.Rd
c15c43a98f76f969275edfd5e7b204e4 *man/create.pw.be.Rd
60c6c7aa899bedd129453a99fccc7631 *man/md.distri.Rd
31490867ddd725684aeb40d386f2e756 *man/papionin.Rd
b72d5e09e0bcd390a533c890b021b2fc *man/papionin.Rd
b1cd1e19a69199785fcefda5c659c608 *man/ssim.distri.Rd
3a9b57f73274cebffb26db7b9bd26c8e *man/tps.all.Rd
ff2b4b6fdf641056cc44d0077dbd153c *man/tps.all.Rd
df5a5a1b85d004bd5bbb8f5dfd1062b3 *man/xxyy.to.array.Rd
32aba465cd587707f478d55cbd682021 *vignettes/prWarp-homo-example.Rmd
364f4b587329927704d134dc5394974d *vignettes/prWarp-papionin-example.Rmd
fe66cbdee6425636e4999d0af688bb78 *vignettes/prWarp-homo-example.Rmd
d743e2a701eed21092f34cdb137e91fb *vignettes/prWarp-papionin-example.Rmd
10 changes: 10 additions & 0 deletions NEWS
@@ -0,0 +1,10 @@
# CHANGES IN PRWARP VERSION 1.0.1

### OTHER CHANGES

* Replaced all url by the DOI in the references of the two datasets 'HomoMidSag' and 'papionin'
* Added spaces after each item of the 'outline' element in the description of the dataset 'papionin'
* Updated the reference Grunstra et al. (2021) which was 'in press' in the vignettes, datasets and CITATION files
* Replaced all occurences of plot.param by plot_param in the two vignettes 'prWarp: Homo example' and 'prWarp: Papionin example'
* Remove 'include = FALSE' for the chunk 'gpa' in the vignette 'prWarp: Homo example'

4 changes: 2 additions & 2 deletions R/HomoMidSag-dataset.R
Expand Up @@ -7,10 +7,10 @@
#' Master's thesis, University of Vienna.
#' @references Mitteroecker, Philipp et al. (2020)
#' Morphometric variation at different spatial scales: coordination and compensation in the emergence of organismal form.
#' \emph{Systematic Biology}, syaa007. \url{https://doi.org/10.1093/sysbio/syaa007}
#' \emph{Systematic Biology}, 69(5): 913--926. doi: 10.1093/sysbio/syaa007
#' @references Mitteroecker, Philipp et al. (2020)
#' Data form: Morphometric variation at different spatial scales: coordination and compensation in the emergence of organismal form.
#' \emph{Dryad Digital Repository}. \url{https://doi.org/10.5061/dryad.j6q573n8s}
#' \emph{Dryad Digital Repository}. doi: 10.5061/dryad.j6q573n8s
#'
#' @name HomoMidSag
#' @usage data(HomoMidSag)
Expand Down
21 changes: 9 additions & 12 deletions R/papionin-dataset.R
Expand Up @@ -6,23 +6,20 @@
#' The data correspond to a list with the 6 following elements:
#'
#' \itemize{
#' \item \strong{coords} {The 3D array of landamrk coordinates}
#' \item \strong{species} {The vector of species names}
#' \item \strong{semi_lm} {The vector of semilandmark numbers of the full dataset}
#' \item \strong{curves} {The list of curves for sliding semilandmarks of the full dataset}
#' \item \strong{links} {The matrix of links between landmarks for the full dataset}
#' \item \strong{outline} {A list of 4 elements for the analysis of the outline shape:
#' \strong{subset}, the landmark numbers for the susbet;
#' \strong{semi_lm}, the vector of semilandmark numbers;
#' \strong{curves}, the list of curves for sliding semilandmarks;
#' \strong{links}, the matrix of links between landmarks for the full dataset.}
#' \item {\strong{coords} The 3D array of landmark coordinates}
#' \item {\strong{species} The vector of species names}
#' \item {\strong{semi_lm} The vector of semilandmark numbers of the full dataset}
#' \item {\strong{curves} The list of curves for sliding semilandmarks of the full dataset}
#' \item {\strong{links} The matrix of links between landmarks for the full dataset}
#' \item {\strong{outline} A list of 4 elements for the analysis of the outline shape: \strong{subset}, the landmark numbers for the susbet; \strong{semi_lm}, the vector of semilandmark numbers; \strong{curves}, the list of curves for sliding semilandmarks; \strong{links}, the matrix of links between landmarks for the full dataset.}
#' }
#'
#' @references Grunstra, Nicole D. S. et al. (in press)
#' @references Grunstra, Nicole D. S. et al. (2021)
#' Detecting phylogenetic signal and adaptation in papionin cranial shape by decomposing variation at different spatial scales.
#' \emph{Systematic Biology}, 70(4): 694--706. doi: 10.1093/sysbio/syaa093
#' @references Grunstra, Nicole D. S. et al. (2020)
#' Data form: Detecting phylogenetic signal and adaptation in papionin cranial shape by decomposing variation at different spatial scales.
#' \emph{Dryad Digital Repository}. \url{https://doi.org/10.5061/dryad.zkh189373}
#' \emph{Dryad Digital Repository}. doi: 10.5061/dryad.zkh189373
#'
#' @name papionin
#' @usage data(papionin)
Expand Down
6 changes: 3 additions & 3 deletions R/tps.all.R
@@ -1,8 +1,8 @@
#' Thin plate spline mapping (2D and 3D) for several sets of landmark coordinates
#'
#' @description Maps landmarks via thin plate spline
#' based on a reference and a target configuration in 2D and 3D.
#' This function is an extension of the tps3d function a set of specimens.
#' based on a reference and a target configuration in 2D or in 3D.
#' This function is an extension of the tps3d function for a set of specimens.
#'
#' @param X_array original coordinates
#' - a 3D array (p x k x n) containing original landmark coordinates for a set of specimens
Expand All @@ -17,7 +17,7 @@
#'
#' @references Bookstein FL. (1989).
#' Principal Warps: Thin-plate splines and the decomposition of deformations.
#' \emph{IEEE Transactions on pattern analysis and machine intelligence 11(6)}: 567--585.
#' \emph{IEEE Transactions on pattern analysis and machine intelligence}, 11(6): 567--585.
#' \url{https://ieeexplore.ieee.org/abstract/document/24792}
#'
#' @return Function returns a 3D array (p x k x n) containing the deformed input
Expand Down
Binary file modified build/vignette.rds
Binary file not shown.
19 changes: 12 additions & 7 deletions inst/CITATION
@@ -1,22 +1,27 @@
citHeader("To cite prWarp in publication use:")

citEntry(
entry="Article",
bibentry(
bibtype="Article",
title="Detecting phylogenetic signal and adaptation in papionin cranial shape by decomposing variation at different spatial scales",
author="Nicole D. S. Grunstra and Silvester Bartsch and Anne Le Maitre and Philipp Mitteroecker",
journal="Systematic Biology",
year="2020",
textVersion="Grunstra, N.D.S., et al. (in press) Detecting phylogenetic signal and adaptation in papionin cranial shape by decomposing variation at different spatial scales. Systematic Biology."
year="2021",
volume="70",
number="4",
pages="694--706",
doi="10.1093/sysbio/syaa093",
textVersion="Grunstra, N.D.S., et al. (2021) Detecting phylogenetic signal and adaptation in papionin cranial shape by decomposing variation at different spatial scales. Systematic Biology, 70(4): 694--706. https://doi.org/10.1093/sysbio/syaa093"
)

citEntry(
entry="Article",
bibentry(
bibtype="Article",
title="Morphometric variation at different spatial scales: coordination and compensation in the emergence of organismal form",
author="Philipp Mitteroecker and Silvester Bartsch and Corinna Erkinger and Nicole D. S. Grunstra and Anne Le Maitre and Fred L. Bookstein",
journal="Systematic Biology",
year="2020",
volume="69",
number="5",
pages="913--926",
textVersion="Mitteroecker, P., et al. (2020) Morphometric variation at different spatial scales: coordination and compensation in the emergence of organismal form. Systematic Biology, 69(5): 913--926. https://doi.org/10.1093/sysbio/syaa007 "
doi="10.1093/sysbio/syaa007",
textVersion="Mitteroecker, P., et al. (2020) Morphometric variation at different spatial scales: coordination and compensation in the emergence of organismal form. Systematic Biology, 69(5): 913--926. https://doi.org/10.1093/sysbio/syaa007"
)
8 changes: 4 additions & 4 deletions inst/doc/prWarp-homo-example.R
Expand Up @@ -12,7 +12,7 @@ homo_ar <- geomorph::arrayspecs(HomoMidSag, k, 2) # create an array
dimnames(homo_ar)[[1]] <- 1:k
dimnames(homo_ar)[[2]] <- c("X", "Y")

## ----gpa, include=FALSE-------------------------------------------------------
## ----gpa----------------------------------------------------------------------
homo_gpa <- Morpho::procSym(homo_ar)
m_overall <- homo_gpa$rotated # Procrustes coordinates
m_mshape <- homo_gpa$mshape # average shape
Expand Down Expand Up @@ -41,7 +41,7 @@ tr_nonaf <- sum(diag(t(homo_be_pw$Xnonaf) %*% homo_be_pw$Xnonaf))
# Convert matrix into a 3D array
Anonaf <- xxyy.to.array(homo_be_pw$Xnonaf, p = k, k = 2)
# Plot the non-affine shape variation around the mean
geomorph::plotAllSpecimens(Anonaf, plot.param = list(pt.cex = 0.3, mean.cex = 0.8, mean.col = "red"))
geomorph::plotAllSpecimens(Anonaf, plot_param = list(pt.cex = 0.3, mean.cex = 0.8, mean.col = "red"))

## -----------------------------------------------------------------------------
# Compute the self-similar distribution
Expand All @@ -51,7 +51,7 @@ tr_defl <- sum(diag(t(Xdefl) %*% Xdefl))
# Convert matrix into a 3D array
Adefl <- xxyy.to.array(Xdefl, p = k, k = 2)
# Plot the self-similar distribution
geomorph::plotAllSpecimens(Adefl, plot.param = list(pt.cex = 0.3, mean.cex = 0.8, mean.col = "red"))
geomorph::plotAllSpecimens(Adefl, plot_param = list(pt.cex = 0.3, mean.cex = 0.8, mean.col = "red"))


## -----------------------------------------------------------------------------
Expand All @@ -60,5 +60,5 @@ Xmd <- md.distri(m_mshape, n = n_spec, sd = 0.005)
# Convert matrix into a 3D array
Amd <- xxyy.to.array(Xmd, p = k, k = 2)
# Plot the Mardia-Dryden distribution
geomorph::plotAllSpecimens(Amd, plot.param = list(pt.cex = 0.3, mean.cex = 0.8, mean.col = "red"))
geomorph::plotAllSpecimens(Amd, plot_param = list(pt.cex = 0.3, mean.cex = 0.8, mean.col = "red"))

14 changes: 7 additions & 7 deletions inst/doc/prWarp-homo-example.Rmd
Expand Up @@ -33,7 +33,7 @@ dimnames(homo_ar)[[2]] <- c("X", "Y")
```

Superimpose landmarks using the generalized Procrustes analysis (GPA).
```{r gpa, include=FALSE}
```{r gpa}
homo_gpa <- Morpho::procSym(homo_ar)
m_overall <- homo_gpa$rotated # Procrustes coordinates
m_mshape <- homo_gpa$mshape # average shape
Expand All @@ -46,7 +46,7 @@ plot(m_mshape, asp = 1, main = "Average shape", xlab = "X", ylab = "Y")

## Partial warp decomposition

Decompose the 87 Procrustes aligned landmarks into partial warps. The reference matrix is generally the average landmark configuration. Note that the function `create.pw.be` returns principal warps, partial warp scores, partial warp variation and associated bending energies, but also the non-affine componentn of shape variation.
Decompose the 87 Procrustes aligned landmarks into partial warps. The reference matrix is generally the average landmark configuration. Note that the function `create.pw.be` returns principal warps, partial warp scores, partial warp variation and associated bending energies, but also the non-affine componennt of shape variation.
```{r partial warp decomposition}
homo_be_pw <- create.pw.be(m_overall, m_mshape)
```
Expand All @@ -72,7 +72,7 @@ tr_nonaf <- sum(diag(t(homo_be_pw$Xnonaf) %*% homo_be_pw$Xnonaf))
# Convert matrix into a 3D array
Anonaf <- xxyy.to.array(homo_be_pw$Xnonaf, p = k, k = 2)
# Plot the non-affine shape variation around the mean
geomorph::plotAllSpecimens(Anonaf, plot.param = list(pt.cex = 0.3, mean.cex = 0.8, mean.col = "red"))
geomorph::plotAllSpecimens(Anonaf, plot_param = list(pt.cex = 0.3, mean.cex = 0.8, mean.col = "red"))
```

## Self-similar and Mardia-Dryden distributions
Expand All @@ -86,7 +86,7 @@ tr_defl <- sum(diag(t(Xdefl) %*% Xdefl))
# Convert matrix into a 3D array
Adefl <- xxyy.to.array(Xdefl, p = k, k = 2)
# Plot the self-similar distribution
geomorph::plotAllSpecimens(Adefl, plot.param = list(pt.cex = 0.3, mean.cex = 0.8, mean.col = "red"))
geomorph::plotAllSpecimens(Adefl, plot_param = list(pt.cex = 0.3, mean.cex = 0.8, mean.col = "red"))
```

Expand All @@ -97,15 +97,15 @@ Xmd <- md.distri(m_mshape, n = n_spec, sd = 0.005)
# Convert matrix into a 3D array
Amd <- xxyy.to.array(Xmd, p = k, k = 2)
# Plot the Mardia-Dryden distribution
geomorph::plotAllSpecimens(Amd, plot.param = list(pt.cex = 0.3, mean.cex = 0.8, mean.col = "red"))
geomorph::plotAllSpecimens(Amd, plot_param = list(pt.cex = 0.3, mean.cex = 0.8, mean.col = "red"))
```

## References

Bartsch S (2019). *The ontogeny of hominid cranial form: A geometric morphometric analysis of coordinated and compensatory processes.* Master's thesis, University of Vienna.

Bookstein FL (1989). Principal Warps: Thin-plate splines and the decomposition of deformations. *IEEE Transactions on pattern analysis and machine intelligence 11(6)*: 567--585. https://ieeexplore.ieee.org/abstract/document/24792
Bookstein FL (1989). Principal Warps: Thin-plate splines and the decomposition of deformations. *IEEE Transactions on pattern analysis and machine intelligence*, 11(6): 567--585. https://ieeexplore.ieee.org/abstract/document/24792

Mitteroecker P et al. (2020a). Morphometric variation at different spatial scales: coordination and compensation in the emergence of organismal form. *Systematic Biology*, syaa007. https://doi.org/10.1093/sysbio/syaa007
Mitteroecker P et al. (2020a). Morphometric variation at different spatial scales: coordination and compensation in the emergence of organismal form. *Systematic Biology*, 69(5): 913--926. https://doi.org/10.1093/sysbio/syaa007

Mitteroecker P et al. (2020b). Data form: Morphometric variation at different spatial scales: coordination and compensation in the emergence of organismal form.*Dryad Digital Repository*. https://doi.org/10.5061/dryad.j6q573n8s

0 comments on commit d40723d

Please sign in to comment.