diff --git a/R/layout_stress.R b/R/layout_stress.R index 7856677..1c3f40c 100644 --- a/R/layout_stress.R +++ b/R/layout_stress.R @@ -479,7 +479,7 @@ layout_with_fixed_coords <- function(g, coords, weights = NA, if (missing(coords)) { stop('"coords" is missing with no default.') } - if (nrow(xy) != vcount(g) && ncol(xy) != 2) { + if (nrow(coords) != igraph::vcount(g) && ncol(coords) != 2) { stop("coords has the wrong dimensions") } if (all(!is.na(coords))) {