Skip to content

Commit

Permalink
In case of dist object for site cov
Browse files Browse the repository at this point in the history
  • Loading branch information
daijiang committed Feb 21, 2024
1 parent 3b49dda commit 33f1938
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Imports:
latticeExtra,
tidyr
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
LinkingTo:
Rcpp, RcppArmadillo
Suggests:
Expand Down
2 changes: 2 additions & 0 deletions R/pglmm-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ parse_conv_ranef = function(x, df){
Vphy = Vphy[spl, spl] # same order as species levels
}

if(inherits(xx, "dist")) xx = as.matrix(xx)

if(inherits(xx, c("matrix", "Matrix"))){
# already a cov matrix
if(length(setdiff(spl, row.names(xx))))
Expand Down

0 comments on commit 33f1938

Please sign in to comment.