biometry / bipartite

repository for the bipartite R-package for network analysis
37 stars 17 forks source link

plotModuleWeb() throws length error! #17

Closed ReichYang closed 1 year ago

ReichYang commented 1 year ago

Hi, I was trying to plot the modules--I don't think I have problems with running the modularity computation, but when it comes to plotting it ALWAYS gives me this error.

> library(bipartite)
Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.6-4
Loading required package: sna
Loading required package: statnet.common

Attaching package: ‘statnet.common’

The following objects are masked from ‘package:base’:

    attr, order

Loading required package: network

‘network’ 1.18.1 (2023-01-24), part of the Statnet Project
* ‘news(package="network")’ for changes since last version
* ‘citation("network")’ for citation information
* ‘https://statnet.org’ for help, support, and other information

sna: Tools for Social Network Analysis
Version 2.7-1 created on 2023-01-24.
copyright (c) 2005, Carter T. Butts, University of California-Irvine
 For citation information, type citation("sna").
 Type help(package="sna") to get started.

 This is bipartite 2.18.
 For latest changes see versionlog in ?"bipartite-package". For citation see: citation("bipartite").
 Have a nice time plotting and analysing two-mode networks.

Attaching package: ‘bipartite’

The following object is masked from ‘package:vegan’:

    nullmodel

> data(small1976)
> moduleWebObject = computeModules(small1976)
> plotModuleWeb(moduleWebObject)
Error in dim(slot(moduleWebObject, "originalWeb")) == 0 || dim(slot(moduleWebObject,  : 
  'length = 2' in coercion to 'logical(1)'
cdormann commented 1 year ago

You run the CRAN-version of bipartite, not the 2.19 from github. Please update to 2.19, which should have fixed that error (commit 2fb52577d2 15 Sept 2023).