Error in `plot.Node(tree)`: Package "DiagrammeR" is required to plot a `data.tree::Node`object. Please install it.

test_that("makeTree function returns correct s3 class", {
# Test whether the output of confInts contains the right number of values
test_that("confInts() returns correct number of values", {
#Zhats <- wmmTree(tree, sample_length = 2)
# Test whether the output of ko.weights contains the right number of values
#test_that("ko.weights() returns correct number of values", {
#  Zhats <- wmmTree(tree, sample_length = 2)
#  getleaves <- which(tree$Get('TerminalCount', filterFun = isLeaf,
# Test whether the output of logEstimates contains the right number of values
#test_that("logEstimates() returns correct number of values", {
# Test whether the output of mmEstimate returns NA for non-leaf
test_that("mmEstimate() returns correct value for non-leaf", {
# Test whether the output of mmEstimate returns NA for leaf at end of informative path
test_that("mmEstimate() returns correct value for leaf at end of informative path", {
# Test whether the output of Nhats contains the right number of values
#test_that("Nhats() returns correct number of values", {
# Test whether the output of root.confInt contains the right number of values
#test_that("root.confInt() returns correct number of values", {
# Test whether the output of sampleBeta returns double less than 1
test_that("sampleBeta() returns double less than 1", {
expect_type(sampleBeta(10, 55, pop = FALSE, tree$A), "double")
expect_lt(sampleBeta(10, 55, pop = FALSE, tree$A), 1)
# Test whether the output of ss.confInts contains the right number of values
#test_that("ss.confInts() returns correct number of values", {
# Test whether the output of ssEstimate returns NA for non-leaf
test_that("ssEstimate() returns correct value for non-leaf", {
# Test whether the output of ssEstimate returns NA for leaf endpoint of informative path
test_that("ssEstimate() returns correct value for a valid leaf endpoint", {
# Test creation of correct type with countTree
test_that("countTree function returns correct type", {
Zhats <- wmmTree(tree, sample_length = 2)
# Test creation of correct type with drawTree
test_that("drawTree function returns correct type", {
# Test creation of correct type with estTree
test_that("estTree function returns correct type", {
# Test wmmTree generates list with 4 entries
test_that("wmmTree function generates list with four entries", {