paytonjjones/networktree

comparetree

Closed this issue · 2 comments

RStudio not recognizing compare tree; see below error. Thanks Payton!

comparetree(tree1, id1 = 1,id2 = 2, plot=TRUE)
Error in comparetree(tree1, id1 = 1, id2 = 2, plot = TRUE) :
could not find function "comparetree"

Hi lbros02, I'm really sorry I missed the notification, and did not check the package for a long time.

I am unable to replicate your error.

Could you try running the following code?:

require(networktree)

data(dass)
depressionnitems <- colnames(dass)[(grep("_D", colnames(dass)))]
nwt_age <- networktree(nodevars = dass[,depressionnitems], 
                         splitvars= dass[,"age"],
                         na.action= na.omit, 
                         alpha = 0.05)

networktree::comparetree(nwt_age, id1 = 1, id2 = 2, plot = TRUE)
comparetree(nwt_age, id1 = 1, id2 = 2, plot = TRUE)

Closing the issue as I'm unable to replicate the error.