Skip to content

Commit

Permalink
rescale only monoMDS result: fixes issue #310
Browse files Browse the repository at this point in the history
(cherry picked from commit 8ad3e80)
  • Loading branch information
Jari Oksanen committed Apr 6, 2019
1 parent 9c680df commit d115d75
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/metaMDS.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
cat(">>> Post-processing NMDS\n")
points <- postMDS(out$points, dis, plot = max(0, plot - 1), ...)
## rescale monoMDS scaling if postMDS scaled 'points'
if (!is.null(scl <- attr(points, "internalscaling"))) {
if (engine == "monoMDS" &&
!is.null(scl <- attr(points, "internalscaling"))) {
out$dist <- out$dist/scl
out$dhat <- out$dhat/scl
}
Expand Down

0 comments on commit d115d75

Please sign in to comment.