I have problems to parallely use R packages bnlearn
and sna
. The following example is straightforward:
library(bnlearn)
data("asia")
# build network
a <- hc(asia)
# output
a
The output is as expected:
Bayesian network learned via Score-based methods
model:
[A][S][T][L|S][B|S][E|T:L][X|E][D|B:E]
nodes: 8
arcs: 7
undirected arcs: 0
directed arcs: 7
average markov blanket size: 2.25
average neighbourhood size: 1.75
average branching factor: 0.88
learning algorithm: Hill-Climbing
score: BIC (disc.)
penalization coefficient: 4.258597
tests used in the learning procedure: 77
optimized: TRUE
Once I load the sna
package, I receive something completely different:
library(sna)
#output
a
I get:
Biased Net Model
Parameters:
Error in matrix(c(x$d, x$pi, x$sigma, x$rho), ncol = 1) :
'data' must be of a vector type, was 'NULL'
As I don't really call any functions (just want to get the output of a
), I don't think that using the ::
operator can help.
I wonder if the problem is masking of an internal function that I can't really influence. Any help would be great!