Skip to content

Commit

Permalink
package pre-release
Browse files Browse the repository at this point in the history
  • Loading branch information
TGuillerme committed Oct 1, 2019
1 parent de9d90c commit b3631e3
Show file tree
Hide file tree
Showing 31 changed files with 119 additions and 278 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Package: moms
Title: Measuring Occupancy in Multidimensional Spaces
Author: Thomas Guillerme [aut, cre, cph]
Maintainer: Thomas Guillerme <[email protected]>
Version: 0.3.4
Date: 2019-09-16
Version: 0.3.5
Date: 2019-10-01
Description: A shiny app for exploring measurements of multidimensional space occupancy (disparity).
Depends:
R (>= 3.5.2),
Expand Down
7 changes: 5 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import(dispRity)
import(stats)
import(grDevices)
import(graphics)
#importFrom("ellipse", "plotcorr")
# importFrom("shinyMatrix", "matrixInput", "updateMatrixInput")

## Functions
export(reduce.space)
Expand All @@ -11,6 +11,9 @@ export(vdp.dispRity)
export(vdp.plot)
export(vdp.check.table)

## Shiny utilities (moms)
# export(shinyMatrix.alias)

## Simulations (paper)
export(space.simulation)
export(shift.group.simulation)
Expand All @@ -35,4 +38,4 @@ export(s.test)
export(extract.results)
export(summarise.metrics)
export(save.results)
export(load.results)
export(load.results)
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dispRity 0.2.0 (2016-04-01)
* Blabla
-->
moms v0.3 (2019-09-16)
moms v0.3 (2019-10-01)
=========================

### NEW FEATURES
Expand All @@ -31,6 +31,7 @@ dispRity 0.2.0 (2016-04-01)
### MINOR IMPROVEMENTS

* the functions to generate the paper are now properly documented with examples
* pre-release cleaning

moms v0.2 (2019-05-09)
=========================
Expand Down
5 changes: 0 additions & 5 deletions R/extract.results.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,8 @@
#' @param metric which metric to extract
#' @param element which element to extract (e.g. number of dimensions, type of space, etc.) can be "all"
#' @param transfo which transformation to extract (e.g. random, density, etc.) can be "all"
#'
#' @examples
#'
#' @seealso
#'
#' @author Thomas Guillerme
#' @export

extract.results <- function(all_results, metric, element = "all", transfo = "all") {

Expand Down
5 changes: 1 addition & 4 deletions R/fast.disparity.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@
#' ## A group of four observations
#' group <- c(TRUE, TRUE, TRUE, TRUE, FALSE)
#'
#' ## The disparity
#' ## The disparity
#' fast.disparity(group, space, metric, rare.dim = 5)
#'
#' @seealso
#'
#' @author Thomas Guillerme
#' @export
#'

fast.disparity <- function(group, space, metric, rare.dim) {
## Setting up the default args
Expand Down
1 change: 0 additions & 1 deletion R/metrics.simulation.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#' @seealso space.simulation shift.group.simulation
#'
#' @author Thomas Guillerme
#' @export

metrics.simulation <- function(space, reduction, metrics, rare.dim = NULL, verbose = TRUE) {

Expand Down
34 changes: 20 additions & 14 deletions R/moms-package.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Measuring Occupancy of Multidimensional Spaces
#' @title Measuring Occupancy of Multidimensional Spaces
#'
#' A shiny app for measuring occupancy of multidimensional spaces
#' @description A shiny app for measuring occupancy of multidimensional spaces
#'
#' @name moms-package
#'
Expand All @@ -11,21 +11,27 @@

NULL

#' Demo datasets
#' @title Demo datasets
#'
#' A set six trait spaces with different groups and different dimensions
#' @description A set six trait spaces with different groups and different dimensions
#'
#' @details
#' \itemize{
#' \item \code{Beck2014} @@@
#' \item \code{Wright2017} @@@
#' \item \code{Marcy2016} @@@
#' \item \code{@@@} @@@
#' \item \code{Jones2015} @@@
#' \item \code{@@@} @@@
#' \item \code{Beck2014} A palaeobiology study of mammals. The data is a 105 dimensions ordination (PCO) of the distances between 106 mammals based on discrete morphological characters.
#' \item \code{Wright2017} A palaeobiology study of crinoids. The data is a 41 dimensions ordination (PCO) of the distances between 42 crinoids based on discrete morphological characters.
#' \item \code{Marcy2016} A geometric morphometric study of gophers (rodents). The data is a 134 dimensions ordination (PCA) the Procrustes superimposition of landmarks from 454 gopher skulls.
#' \item \code{Hopkins2016} A geometric morphometric study of trilobites. The data is a 134 dimensions ordination (PCA) the Procrustes superimposition of landmarks from 46 trilobites cephala.
#' \item \code{Jones2015} An ecological landscape study. The data is a 47 dimensions ordination (PCO) of the Jaccard distances between 48 field sites based on species composition.
#' \item \code{Healy2019} A life history analysis of the pace of life in animals. The data is a 6 dimensions ordination (PCA) of 6 life history traits from 285 animal species.
#' }
#'
#' @format @@@
#' @source @@@
#' @references @@@
#' @references Beck, R. M., & Lee, M. S. (2014). Ancient dates or accelerated rates? Morphological clocks and the antiquity of placental mammals. Proceedings of the Royal Society B: Biological Sciences, 281(1793), 20141278.
#' @references Wright, D. F. (2017). Bayesian estimation of fossil phylogenies and the evolution of early to middle Paleozoic crinoids (Echinodermata). Journal of Paleontology, 91(4), 799-814.
#' @references Marcy, A. E., Hadly, E. A., Sherratt, E., Garland, K., & Weisbecker, V. (2016). Getting a head in hard soils: convergent skull evolution and divergent allometric patterns explain shape variation in a highly diverse genus of pocket gophers (Thomomys). BMC evolutionary biology, 16(1), 207.
#' @references Hopkins, M.J. and Pearson, J.K., 2016. Non-linear ontogenetic shape change in Cryptolithus tesselatus (Trilobita) using three-dimensional geometric morphometrics. Palaeontologia Electronica, 19(3), pp.1-54.
#' @references Jones, N. T., Germain, R. M., Grainger, T. N., Hall, A. M., Baldwin, L., & Gilbert, B. (2015). Dispersal mode mediates the effect of patch size and patch connectivity on metacommunity diversity. Journal of Ecology, 103(4), 935-944.
#' @references Healy, K., Ezard, T.H., Jones, O.R., Salguero-Gomez, R. and Buckley, Y.M., 2019. Animal life history is shaped by the pace of life and the distribution of age-specific mortality and reproduction. Nature ecology & evolution, p.1.
#'
#' @name Demo_data
#'
NULL

4 changes: 1 addition & 3 deletions R/reduce.space.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @param remove the proportion of elements to be removed (in probability)
#' @param parameters the parameter(s) for removal selection (see details). If left empty, the \code{parameters} is estimated to reach the amount set by \code{remove}.
#' @param tuning Optinal parameters for tuning the parameter estimations (if remove is required and parameters is missing) a list of three parameters: "max" for the maximum of operations, "tol" for the tuning (e.g. 0.1 close), "inc.steps" for the initial increment value during optimisation (default = 2 - the bigger the value, the slower the increment).
#' @param verbose
#' @param verbose wether to be verbose or not
#' @param return.optim logical, whether to also return the optimal value.
#'
#' @details
Expand Down Expand Up @@ -39,8 +39,6 @@
#' plot(space, pch = 19, col = c("grey", "black")[as.factor(density)],
#' main = "Density removal")
#'
#'
#' @seealso
#'
#' @author Thomas Guillerme

Expand Down
1 change: 0 additions & 1 deletion R/reduce.space_fun.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# ' @param remove the proportion of elements to be removed (in probability)
# ' @param verbose
# ' @param space
#'
## Optimisation function
optimise.parameter <- function(fun, args, criterion, tuning, verbose) {

Expand Down
4 changes: 0 additions & 4 deletions R/results.fable.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@
#' @param overlap whether to add the Bhattacharyya Coefficients or not
#' @param plot.param the plot parameters
#'
#' @examples
#'
#' @seealso
#'
#' @author Thomas Guillerme
#' @export

generate.fable.plot <- function(data, metric, what, scale = TRUE, overlap = FALSE, plot.param) {

Expand Down
2 changes: 1 addition & 1 deletion R/shift.group.simulation.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' @seealso space.simulation metric.simulation
#'
#' @author Thomas Guillerme
#' @export

shift.group.simulation <- function(space, remove, verbose = TRUE) {

## Double check for full TRUE or full FALSE
Expand Down
17 changes: 17 additions & 0 deletions R/shinyMatrix.alias.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# #' @title shinyMatrix utilities
# #'
# #' @description Alias functions for shinyMatrix
# #'
# #' @param x an input
# #' @param type either \code{"input"} or \code{"update"}
# #'
# #' @author Thomas Guillerme

# shinyMatrix.alias <- function(x, type = "input") {
# if(type == "input") {
# out <- shinyMatrix::matrixInput(x)
# } else {
# out <- shinyMatrix::updateMatrixInput(x)
# }
# return(out)
# }
186 changes: 0 additions & 186 deletions R/simulate.metrics.R

This file was deleted.

Loading

0 comments on commit b3631e3

Please sign in to comment.