- dimnames(ratemat)[1:2] <- dimnames(x$lik.anc)[2]
- print(ratemat, na.print = ".")
- cat("\n")
- npar <- length(x$rates)
- estim <- data.frame(1:npar, round(x$rates, digits), round(x$se, digits))
- cat("Parameter estimates:\n")
- names(estim) <- c("rate index", "estimate", "std-err")
- print(estim, row.names = FALSE)
- cat("\nScaled likelihoods at the root (type 'x$lik.anc' to get them for all nodes):\n")
- print(x$lik.anc[1, ])
+ if (is.null(ratemat)) { # to be improved
+ class(x) <- NULL
+ x$loglik <- x$call <- NULL
+ print(x)
+ } else {
+ dimnames(ratemat)[1:2] <- dimnames(x$lik.anc)[2]
+ cat("Rate index matrix:\n")
+ print(ratemat, na.print = ".")
+ cat("\n")
+ npar <- length(x$rates)
+ estim <- data.frame(1:npar, round(x$rates, digits), round(x$se, digits))
+ cat("Parameter estimates:\n")
+ names(estim) <- c("rate index", "estimate", "std-err")
+ print(estim, row.names = FALSE)
+ cat("\nScaled likelihoods at the root (type '...$lik.anc' to get them for all nodes):\n")
+ print(x$lik.anc[1, ])
+ }