Skip to content

Commit

Permalink
Fix error when using "se" in intra_physig.
Browse files Browse the repository at this point in the history
Excluded mistaken sentense from help. Fix issue #182
  • Loading branch information
paternogbc committed Jan 20, 2018
1 parent 79bad17 commit 3d06eda
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions R/intra_physig.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Intraspecific variability - Phylogenetic Linear Regression
#' Intraspecific variability - Phylogenetic signal
#'
#' Performs Phylogenetic signal estimates evaluating
#' trait intraspecific variability
Expand Down Expand Up @@ -30,8 +30,6 @@
#' \code{OUfixedRoot}, \code{OUrandomRoot}, \code{lambda}, \code{kappa},
#' \code{delta}, \code{EB} and \code{trend}. See ?\code{phylolm} for details.
#'
#' Currently, this function can only implement simple linear models (i.e. \eqn{trait~
#' predictor}). In the future we will implement more complex models.
#'
#' Output can be visualised using \code{sensi_plot}.
#'
Expand Down Expand Up @@ -88,7 +86,7 @@

intra_physig <- function(trait.col, data, phy,
V = NULL, n.intra = 100, distrib = "normal",
method = "K", track = TRUE, ...){
method = "K", track = TRUE){
#Error check
if(is.null(V)) stop("V must be defined")
if(class(data) != "data.frame") stop("data must be class 'data.frame'")
Expand Down Expand Up @@ -125,7 +123,8 @@ intra_physig <- function(trait.col, data, phy,
predV <- apply(full.data[,c(trait.col,V)],1,function(x)funr(x[1],x[2]))

#model
mod.s <- phytools::phylosig(tree = phy, x = predV, method = method, test = TRUE, ...)
mod.s <- phytools::phylosig(tree = phy, x = predV, method = method,
test = TRUE)
estimate <- mod.s[[1]]
pval <- mod.s$P

Expand Down

0 comments on commit 3d06eda

Please sign in to comment.