d1 <- data.frame(From = c("Root", "Root", rep(c("A", "B"), 3)),
To = c("A", "B", rep(c("C", "D", "E"), c(2, 2, 2))),
Relation = rep(c("Single", "AND", "OR", "XOR"), rep(2, 4)),
Lambdas = c(0.7, 0.8, rep(c(0.9, 0.4, 0.5), c(2, 2, 2))))
evamtools:::cpm2tm(d1)
Error in as.environment(where) : using 'as.environment(NULL)' is defunct
> traceback()
2: exists("Relation", x$edges)
1: evamtools:::cpm2tm(ex_XOR_AND_OR)
A user might try this
which fails as
So we probably want to:
"Relation" %in% colnames(x$edges)instead ofexists("Relation", x$edges): the second fails whenx$edgesdoes not exist.