X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=R%2FPGLS.R;h=6b6f4afe05408b8a1885f2ac76aa904edf319234;hb=46bc16a7531d871fccb6ea7c2a31d980aac21bd1;hp=510f4017ebb857a51eaba2275d45c3c329deac3f;hpb=269a1dbc3927260e5fc96f535f752fc09596e96e;p=ape.git diff --git a/R/PGLS.R b/R/PGLS.R index 510f401..6b6f4af 100644 --- a/R/PGLS.R +++ b/R/PGLS.R @@ -187,8 +187,8 @@ coef.corGrafen <- function(object, unconstrained = TRUE, ...) compute.brlen <- function(phy, method = "Grafen", power = 1, ...) { - if (!"phylo" %in% class(phy)) - stop('object "phy" is not of class "phylo"') + if (!inherits(phy, "phylo")) + stop('object "phy" is not of class "phylo"') Ntip <- length(phy$tip.label) Nnode <- phy$Nnode Nedge <- dim(phy$edge)[1]