Skip to content

Commit

Permalink
version 1.0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
rcannood authored and cran-robot committed Sep 23, 2022
1 parent 88d83d9 commit 4e3f23f
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 68 deletions.
8 changes: 4 additions & 4 deletions DESCRIPTION
@@ -1,7 +1,7 @@
Package: dynutils
Type: Package
Title: Common Functionality for the 'dynverse' Packages
Version: 1.0.9
Version: 1.0.10
Authors@R: c(
person(
"Robrecht",
Expand All @@ -25,7 +25,7 @@ Description:
License: MIT + file LICENSE
URL: https://github.com/dynverse/dynutils
BugReports: https://github.com/dynverse/dynutils/issues
RoxygenNote: 7.1.1
RoxygenNote: 7.2.1
Depends: R (>= 3.0.0)
Imports: assertthat, crayon, desc, dplyr, magrittr, Matrix, methods,
proxyC, purrr, Rcpp, remotes, stringr, tibble
Expand All @@ -34,10 +34,10 @@ LinkingTo: Rcpp
Encoding: UTF-8
VignetteBuilder: knitr
NeedsCompilation: yes
Packaged: 2021-10-06 08:32:19 UTC; rcannood
Packaged: 2022-09-23 04:19:47 UTC; rcannood
Author: Robrecht Cannoodt [aut, cre] (<https://orcid.org/0000-0003-3641-729X>,
rcannood),
Wouter Saelens [aut] (<https://orcid.org/0000-0002-7114-6248>, zouter)
Maintainer: Robrecht Cannoodt <rcannood@gmail.com>
Repository: CRAN
Date/Publication: 2021-10-08 08:40:08 UTC
Date/Publication: 2022-09-23 04:50:03 UTC
16 changes: 8 additions & 8 deletions MD5
@@ -1,11 +1,11 @@
2a3ab77f9f615e16875897fe08275066 *DESCRIPTION
01dc47de1066237723b4b980c2a50758 *DESCRIPTION
ef3d9f056adaa322680184035912700f *LICENSE
43a8cfbebd9b581c7f7fcb8451f7e549 *NAMESPACE
e2f7be7e1c5e3a278dae1a492036439d *NEWS.md
f1b5a8eee2c76519e68997f32d44e209 *NEWS.md
dcdf2491b0e62a545623862a87d55529 *R/RcppExports.R
6f7fc8ddd74f0326bf2b59a523681cf7 *R/add_class.R
93ee58dfa8e9d0165a0aadbc62cfb01a *R/assertions.R
bb6beeb3505b07b1e77e64718f3da1d2 *R/calculate_distance.R
3d9950e1017544b18c403d586e21b5ff *R/calculate_distance.R
d6aa6f13af04adf14f579e08fc13d984 *R/calculate_mean.R
e2b7b0caa56d6a39e5f74f05f1ba7546 *R/check_packages.R
cdbbf9a1f8aea5c2df485b414eed39ad *R/development.R
Expand All @@ -23,17 +23,17 @@ daccd8c60b01253c6e32ca32fdd5cad0 *R/news.R
12824c964b81e3b502211cc6b009ecc1 *R/sparse_matrix.R
ed5a6e94e1159f1aafdcfc1c82c27d49 *R/spearman_rank_sparse.R
508280137e6c0eb4d37a5872de6ab486 *R/tibble.R
4c7e41556e9fa4e748e25989f462b8b8 *README.md
97438e22f9f6789b6c35f75e506e56ab *build/vignette.rds
846ee36aee1fb4a1243092b7cfc8da50 *README.md
1e902dd0285e4faae21d79ab0bef21b8 *build/vignette.rds
4cb744174c2d40de083a580148109a16 *inst/doc/functionality.R
67a99a10f52ab86808d981449e524ff3 *inst/doc/functionality.Rmd
dcb5332606860913f551afc1e00df8fe *inst/doc/functionality.html
0a06c6493c907a0806a3fd9cfdea0d12 *inst/doc/functionality.html
c3db2b03d9fad3aa6837b3f565dfdebd *man/add_class.Rd
6bc340f4659bf12f836063f6dbdd2329 *man/all_in.Rd
b5ac523861808607b014847cb3797765 *man/apply_minmax_scale.Rd
64174b3e65b65ce84ce3293ae492f994 *man/apply_quantile_scale.Rd
3bef0a231eef2816e0a263a1e4a2242c *man/apply_uniform_scale.Rd
2096ec04355b4f0e3a9ddd0bf91b9a47 *man/calculate_distance.Rd
2aee4613e71cce116c03a5d95ed45b36 *man/calculate_distance.Rd
5b35a6f332946299b91d087180993a29 *man/calculate_mean.Rd
3252699f0111548d1c5865b259fc6045 *man/check_packages.Rd
8119f54576526e375c65967172a35730 *man/deprecated.Rd
Expand Down Expand Up @@ -72,7 +72,7 @@ e98edf1dd851bb968f099085613e1641 *tests/testthat.R
dbb99d66a04da64c942eeb3d2aad76a4 *tests/testthat/test-check_packages.R
7485242237d66f602ee1126cbe4000c2 *tests/testthat/test-expand_matrix.R
8faa7d5a28c69f65e45e8ff451fc705b *tests/testthat/test-extend_with.R
ab9e302bf557b200c0a2f78471fac0ca *tests/testthat/test-h5.R
48a8e6ae72f8b892907ceb61effbafbf *tests/testthat/test-h5.R
5ce31da95e0ab2cae64f31550e6957c1 *tests/testthat/test-inherit_default_params.R
eb500b1fea1726787b4e1cc25de6caa0 *tests/testthat/test-mapdf.R
2f28fa4dc32b2a5021930c26962ff27d *tests/testthat/test-news.R
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
@@ -1,3 +1,7 @@
# dynutils 1.0.10

* MINOR CHANGE: Add `use_nan` passthrough argument for proxyC.

# dynutils 1.0.9

* BUG FIX `read_h5()` and `write_h5()`: Surround functionality with `if(requireNamespace(., quietly = TRUE))`.
Expand Down
14 changes: 7 additions & 7 deletions R/calculate_distance.R
Expand Up @@ -5,9 +5,7 @@
#' @param x A numeric matrix, dense or sparse.
#' @param y (Optional) a numeric matrix, dense or sparse, with `nrow(x) == nrow(y)`.
#' @param method Which distance method to use. Options are: `"cosine"`, `"pearson"`, `"spearman"`, `"euclidean"`, and `"manhattan"`.
#' @param margin Which margin to use for the pairwise comparison. 1 => rowwise, 2 => columnwise.
#' @param diag if `TRUE`, only compute diagonal elements of the similarity/distance matrix; useful when comparing corresponding rows or columns of 'x' and 'y'.
#' @param drop0 if `TRUE`, zero values are removed regardless of min_simil or rank.
#' @inheritParams proxyC::simil
#'
#' @export
#'
Expand All @@ -31,7 +29,8 @@ calculate_distance <- function(
"hamming", "kullback", "manhattan", "maximum", "canberra", "minkowski"),
margin = 1,
diag = FALSE,
drop0 = FALSE
drop0 = FALSE,
use_nan = FALSE
) {
method <- match.arg(method)
input <- .process_input_matrices(x = x, y = y, margin = margin)
Expand All @@ -48,7 +47,7 @@ calculate_distance <- function(
1 - (sim + 1) / 2
}
} else {
proxyC::dist(x = x, y = y, method = method, margin = 2, diag = diag, drop0 = drop0)
proxyC::dist(x = x, y = y, method = method, margin = 2, diag = diag, drop0 = drop0, use_nan = use_nan)
}

if (is.null(y)) {
Expand All @@ -71,7 +70,8 @@ calculate_similarity <- function(
margin = 1,
method = c("spearman", "pearson", "cosine"),
diag = FALSE,
drop0 = FALSE
drop0 = FALSE,
use_nan = FALSE
) {
method <- match.arg(method)
input <- .process_input_matrices(x = x, y = y, margin = margin)
Expand All @@ -89,7 +89,7 @@ calculate_similarity <- function(
method <- "correlation"
}

sim <- proxyC::simil(x = x, y = y, method = method, margin = 2, diag = diag, drop0 = drop0)
sim <- proxyC::simil(x = x, y = y, method = method, margin = 2, diag = diag, drop0 = drop0, use_nan = use_nan)

# fixes due to rounding errors
if (method %in% c("pearson", "spearman", "cosine")) {
Expand Down
34 changes: 2 additions & 32 deletions README.md
Expand Up @@ -5,9 +5,9 @@
Status](https://travis-ci.org/dynverse/dynutils.svg?branch=master)](https://travis-ci.org/dynverse/dynutils)
[![AppVeyor Build
Status](https://ci.appveyor.com/api/projects/status/github/dynverse/dynutils?branch=master&svg=true)](https://ci.appveyor.com/project/dynverse/dynutils)
[![CRAN\_Status\_Badge](https://www.r-pkg.org/badges/version/dynutils)](https://cran.r-project.org/package=dynutils)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/dynutils)](https://cran.r-project.org/package=dynutils)
[![Coverage
Status](https://codecov.io/gh/dynverse/dynutils/branch/master/graph/badge.svg)](https://codecov.io/gh/dynverse/dynutils?branch=master)
Status](https://app.codecov.io/gh/dynverse/dynutils/branch/master/graph/badge.svg)](https://app.codecov.io/gh/dynverse/dynutils?branch=master)

Provides common functionality for the dynverse packages. An overview of
this functionality is available using the `?dynutils` command or in the
Expand All @@ -17,33 +17,3 @@ vignette](https://CRAN.R-project.org/package=dynutils/vignettes/functionality.ht
dynverse is created to support the development, execution, and
benchmarking of trajectory inference methods. For more information,
check out [dynverse.org](https://dynverse.org).

## Latest changes

Check out `news(package = "dynutils")` or [NEWS.md](NEWS.md) for a full
list of changes.

<!-- This section gets automatically generated from inst/NEWS.md, and also generates inst/NEWS -->

### Recent changes in dynutils 1.0.7

- MINOR CHANGE `calculate_distance()`: Convert matrices to
CsparseMatrix instead of dgCMatrix.

- MINOR CHANGE `calculate_distance()`: Pass through the `diag`
argument to proxyC.

- BUG FIX unit test: Order of attributes is not relevant.

### Recent changes in dynutils 1.0.6

- MINOR CHANGE `calculate_distance()`: Allow for many more distance
measures.

- BUG FIX: Import `desc::desc()` where needed.

## Dynverse dependencies

<!-- Generated by "update_dependency_graphs.R" in the main dynverse repo -->

![](man/figures/dependencies.png)
Binary file modified build/vignette.rds
Binary file not shown.

0 comments on commit 4e3f23f

Please sign in to comment.