Merge branch 'fixTravis' into dev

This commit is contained in:
Waldir Leoncio 2020-05-12 06:48:13 +02:00
commit 8e7bc4e36f
4 changed files with 5 additions and 4 deletions

View file

@ -6,7 +6,7 @@
#' @param ninds ninds #' @param ninds ninds
#' @export #' @export
computeRows <- function(rowsFromInd, inds, ninds) { computeRows <- function(rowsFromInd, inds, ninds) {
if (class(inds) != "matrix") inds <- as.matrix(inds) if (!is(inds, "matrix")) inds <- as.matrix(inds)
if (identical(dim(inds), c(nrow(inds), 1L))) { if (identical(dim(inds), c(nrow(inds), 1L))) {
# Special treatment for vectors because R has col vectors by default, # Special treatment for vectors because R has col vectors by default,
# whereas Matlab has row vectors by default. # whereas Matlab has row vectors by default.

View file

@ -4,7 +4,7 @@
#' @param x array #' @param x array
#' #'
isempty <- function(x) { isempty <- function(x) {
if (class(x) %in% c("array", "matrix")) { if (class(x)[1] %in% c("array", "matrix")) {
dim_mat_x <- dim(x) dim_mat_x <- dim(x)
} else { } else {
dim_mat_x <- dim(matrix(x)) dim_mat_x <- dim(matrix(x))

View file

@ -14,7 +14,7 @@ repmat <- function (mx, n) {
# Validation # Validation
if (length(n) > 3) warning("Extra dimensions of n ignored") if (length(n) > 3) warning("Extra dimensions of n ignored")
if (length(n) == 1) n <- rep(n, 2) if (length(n) == 1) n <- rep(n, 2)
if (class(mx) != "matrix") mx <- as.matrix(mx) if (!is(mx, "matrix")) mx <- as.matrix(mx)
# Replicating cols # Replicating cols
out <- mx_col <- matrix(rep(mx, n[2]), nrow(mx)) out <- mx_col <- matrix(rep(mx, n[2]), nrow(mx))

View file

@ -0,0 +1 @@
Most of the data in this directory is in the [Genepop format](https://genepop.curtin.edu.au/help_input.html) format.