Skip to content

Commit

Permalink
Remove check for asymmetry, and open a separate issue #1462.
Browse files Browse the repository at this point in the history
  • Loading branch information
koheiw committed Oct 24, 2018
1 parent eb5b541 commit 4113eda
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
2 changes: 0 additions & 2 deletions R/textplot_network.R
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ as.network.default <- function(x, ...) {
#' @seealso \code{\link[network]{network}}
as.network.fcm <- function(x, min_freq = 0.5, omit_isolated = TRUE, ...) {

if (!x@tri)
stop("Cannot plot ordered fcm")
if (nfeat(x) > 1000) stop('fcm is too large for a network plot')
f <- x@margin
x <- remove_edges(x, min_freq, omit_isolated)
Expand Down
16 changes: 8 additions & 8 deletions tests/testthat/test-textplot_network.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ test_that("remove_edges is working", {

})

test_that("error when fcm is ordered", {

mt <- fcm(c("a a b", "a b", "c b"), ordered = FALSE)
expect_silent(as.network(mt))
mt2 <- fcm(c("a a b", "a b", "c b"), ordered = TRUE)
expect_error(as.network(mt2),
"Cannot plot ordered fcm")
})
# test_that("error when fcm is ordered", {
#
# mt <- fcm(c("a a b", "a b", "c b"), ordered = FALSE)
# expect_silent(as.network(mt))
# mt2 <- fcm(c("a a b", "a b", "c b"), ordered = TRUE)
# expect_error(as.network(mt2),
# "Cannot plot ordered fcm")
# })


0 comments on commit 4113eda

Please sign in to comment.