Hello,
I am getting this error when running WGCNA's blockwiseModules function:
Error in (new("standardGeneric", .Data = function (x, y = NULL, use = "everything", : unused arguments (weights.x = NULL, weights.y = NULL, cosine = FALSE)
I am pretty sure the problem is that the stats::cor function is being used under the hood, rather than WGCNA::cor. I have not found a fix to this issue and it seems many people are experiencing it. Can anyone recommend a workaround.
I have tried loading WGCNA package last, but this does not work either.
Thanks, Arjun
1 answer
I think I found a solution when working in RStudio... from the "Session" pulldown, press restart R.
Then run library(WGCNA).
Run search(): ".GlobalEnv", "package:WGCNA" should be the first and second characters in the vector.
Then run the blockwiseModules function.
Hope this works for other people.
Arjun
Log in to answer this question.
Yes, this issue has been reported before: Error in (function...) thrown by WGCNA tutorial (R)
As mentioned, it's some namespace issue. I had suggested that the cor function that WGCNA wants to use is now outdated, which causes some conflict. WGCNA is not really maintained anymore. Please see if you can find the answer in the other thread to which I have linked you.