-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
616 additions
and
630 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
REPODIR = repo | ||
INCLUDES= | ||
HEADERS= | ||
SESSION_PKGS = datasets,utils,grDevices,graphics,stats,methods,tidyverse,$(PKG) | ||
|
||
include rules.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,40 @@ | ||
#' Greater Antillean anolis lizard sexual size dimorphism data | ||
#' | ||
#' The dataset consists of sexual size-dimorphism data for 38 species of anoles from Cuba, Hispaniola, Jamaica, and Puerto Rico (Butler, Schoener, and Losos 2000). | ||
#' Each of these species belongs to one of six microhabitat types, or "ecomorphs" (sensu Williams, 1972): | ||
#' trunk-ground, grass-bush, trunk, trunk-crown, twig, and crown-giant. | ||
#' The data were used to demonstrate an evolutionary association between habitat type and degree of sexual size dimorphism. | ||
#' | ||
#' Size dimorphism was calcuated as the log-ratio of male snout-to-vent length to female snout-to-vent length (males are larger). | ||
#' | ||
#' In this example, we tested three models of evolution: | ||
#' Brownian motion, Ornstein-Uhlenbeck with one global optimum, and Ornstein-Uhlenbeck with seven optima (one for each ecomorph type plus an additional one for an "unknown" type). | ||
#' | ||
#' For the seven-optima model, we assigned each terminal branch to an optimum according to the ecomorph type of the extant species. | ||
#' Because we had no information to help guide hypotheses about internal branches, we assigned | ||
#' internal branches to the "unknown" selective regime. | ||
#' The phylogeny of these species is consistent with and adaptive radiation, with a burst of speciation events early in the evolutionary history of this clade (see phylogeny in Butler & King (2004) or example below). | ||
#' | ||
#' @name anolis.ssd | ||
#' @rdname anolis_ssd | ||
#' @family examples | ||
#' @docType data | ||
#' @format | ||
#' A data frame with 38 observations on the following 6 variables. | ||
#' - `node`: Labels for the nodes. | ||
#' - `species`: Names of extant species. | ||
#' - `log.SSD`: Log sexual size dimorphism of extant species. | ||
#' - `ancestor`: Name of ancestor node. | ||
#' - `time`: Time of node. | ||
#' - `OU.1`: a factor with one level, `ns`. | ||
#' - `OU.7`: a factor with levels corresponding to ecomorph (`tg`, `tc`, `gb`, `cg`, `tw`, `tr`, `anc`). | ||
#' @author Marguerite A. Butler, Aaron A. King | ||
#' @references | ||
#' \Butler2000 | ||
#' | ||
#' \Williams1972 | ||
#' | ||
#' @source \Butler2004 | ||
#' @keywords models | ||
#' @example examples/anolis.R | ||
#' | ||
##' Greater Antillean anolis lizard sexual size dimorphism data | ||
##' | ||
##' The dataset consists of sexual size-dimorphism data for 38 species of anoles from Cuba, Hispaniola, Jamaica, and Puerto Rico (Butler, Schoener, and Losos 2000). | ||
##' Each of these species belongs to one of six microhabitat types, or "ecomorphs" (sensu Williams, 1972): | ||
##' trunk-ground, grass-bush, trunk, trunk-crown, twig, and crown-giant. | ||
##' The data were used to demonstrate an evolutionary association between habitat type and degree of sexual size dimorphism. | ||
##' | ||
##' Size dimorphism was calcuated as the log-ratio of male snout-to-vent length to female snout-to-vent length (males are larger). | ||
##' | ||
##' In this example, we tested three models of evolution: | ||
##' Brownian motion, Ornstein-Uhlenbeck with one global optimum, and Ornstein-Uhlenbeck with seven optima (one for each ecomorph type plus an additional one for an "unknown" type). | ||
##' | ||
##' For the seven-optima model, we assigned each terminal branch to an optimum according to the ecomorph type of the extant species. | ||
##' Because we had no information to help guide hypotheses about internal branches, we assigned | ||
##' internal branches to the "unknown" selective regime. | ||
##' The phylogeny of these species is consistent with and adaptive radiation, with a burst of speciation events early in the evolutionary history of this clade (see phylogeny in Butler & King (2004) or example below). | ||
##' | ||
##' @name anolis.ssd | ||
##' @rdname anolis_ssd | ||
##' @family examples | ||
##' @docType data | ||
##' @format | ||
##' A data frame with 38 observations on the following 6 variables. | ||
##' - `node`: Labels for the nodes. | ||
##' - `species`: Names of extant species. | ||
##' - `log.SSD`: Log sexual size dimorphism of extant species. | ||
##' - `ancestor`: Name of ancestor node. | ||
##' - `time`: Time of node. | ||
##' - `OU.1`: a factor with one level, `ns`. | ||
##' - `OU.7`: a factor with levels corresponding to ecomorph (`tg`, `tc`, `gb`, `cg`, `tw`, `tr`, `anc`). | ||
##' @author Marguerite A. Butler, Aaron A. King | ||
##' @references | ||
##' \Butler2000 | ||
##' | ||
##' \Williams1972 | ||
##' | ||
##' @source \Butler2004 | ||
##' @keywords models | ||
##' @example examples/anolis.R | ||
NULL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
#' Coerce an \pkg{ouch} object to a data frame | ||
#' | ||
#' @name as_data_frame | ||
#' @rdname as_data_frame | ||
#' @family methods for ouch trees | ||
#' @include ouchtree.R brown.R hansen.R | ||
#' @inheritParams base::as.data.frame | ||
#' | ||
##' Coerce an \pkg{ouch} object to a data frame | ||
##' | ||
##' @name as_data_frame | ||
##' @rdname as_data_frame | ||
##' @family methods for ouch trees | ||
##' @include ouchtree.R brown.R hansen.R | ||
##' @inheritParams base::as.data.frame | ||
##' | ||
NULL | ||
|
||
#' @rdname as_data_frame | ||
#' @export | ||
##' @rdname as_data_frame | ||
##' @export | ||
as.data.frame.ouchtree <- function (x, ...) as(x,"data.frame") | ||
|
||
#' @rdname as_data_frame | ||
#' @export | ||
##' @rdname as_data_frame | ||
##' @export | ||
as.data.frame.browntree <- function (x, ...) as(x,"data.frame") | ||
|
||
#' @rdname as_data_frame | ||
#' @export | ||
##' @rdname as_data_frame | ||
##' @export | ||
as.data.frame.hansentree <- function (x, ...) as(x,"data.frame") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,51 @@ | ||
#' Anolis bimaculatus lizard size data | ||
#' | ||
#' This is the \emph{Anolis bimaculatus} dataset used in Butler & King (2004). | ||
#' It is used to test a hypothesis of character displacement using an interspecific dataset of body sizes and current data on sympatry/allopatry. | ||
#' | ||
#' Explanations of the data follow: | ||
#' - **Body size.** | ||
#' We use the phenotypic data and phylogeny of Losos (1990), which employed the head lengths (of males) as a proxy for body size. | ||
#' In this group of lizards, head length correlates very strongly with snout-to-vent length and the cube root of mass, which are standard measures of body size. | ||
#' The data are head lengths in mm; note that we use the log of this value in analyses. | ||
#' - **Tree structure.** | ||
#' The phylogenetic tree is encoded via three variables: | ||
#' `node`, `ancestor`, and `time`. | ||
#' The `node` variable gives a name to each node. | ||
#' The `ancestor` variable names the ancestor of each node. | ||
#' The root node has no ancestor (i.e., \code{ancestor=NA}). | ||
#' The variable `time` specifies the temporal location of each node, the root node being at time 0. | ||
#' - **Specifications of selective regimes.** | ||
#' (Columns `OU.1`, `OU.3`, `OU.4`, `OU.LP`). | ||
#' These columns are factors, the levels of which correspond to the \dQuote{paintings} of the respective adaptive regime hypotheses onto the phylogeny (see [paint()]). | ||
#' Each selective regime is named (small, medium, large, etc.). | ||
#' Each column corresponds to a different painting of the selective regimes, and thus to a different hypothesis. | ||
#' In this example, there are 3 alternative models (see Butler & King 2004): `OU.4` is 4-regime model, `OU.3` is 3-regime model (all ancestors are medium), `OU.LP` is the linear parsimony model. | ||
#' - **Other variables.** | ||
#' In addition to the above, there is a two-letter code for each taxon (`spcode`) and the name of the island on which the taxon is found (`island`). | ||
#' | ||
#' @name bimac | ||
#' @rdname bimac | ||
#' @docType data | ||
#' @family examples | ||
#' @format A data frame with 45 observations on the following 11 variables. | ||
#' - `node`: Labels for the nodes. | ||
#' - `spcode`: Two-letter code for each taxon. | ||
#' - `species`: Species names for extant species. | ||
#' - `island`: Name of the island on which the population is found. | ||
#' - `size`: Body size (head length in mm) of extant species. | ||
#' - `ancestor`: Ancestral node. | ||
#' - `time`: Time of node. | ||
#' - `OU.1`: a factor with levels `ns` | ||
#' - `OU.3`: a factor with levels `small`, `medium`, `large` | ||
#' - `OU.4`: a factor with levels `small`, `medium`, `large`, `anc` | ||
#' - `OU.LP`: a factor with levels `small`, `medium`, `large` | ||
#' @author Marguerite A. Butler and Aaron A. King | ||
#' @references | ||
#' \Lazell1972 | ||
#' | ||
#' \Losos1990 | ||
#' @source \Butler2004 | ||
#' @keywords models | ||
#' @example examples/bimac.R | ||
#' | ||
##' Anolis bimaculatus lizard size data | ||
##' | ||
##' This is the \emph{Anolis bimaculatus} dataset used in Butler & King (2004). | ||
##' It is used to test a hypothesis of character displacement using an interspecific dataset of body sizes and current data on sympatry/allopatry. | ||
##' | ||
##' Explanations of the data follow: | ||
##' - **Body size.** | ||
##' We use the phenotypic data and phylogeny of Losos (1990), which employed the head lengths (of males) as a proxy for body size. | ||
##' In this group of lizards, head length correlates very strongly with snout-to-vent length and the cube root of mass, which are standard measures of body size. | ||
##' The data are head lengths in mm; note that we use the log of this value in analyses. | ||
##' - **Tree structure.** | ||
##' The phylogenetic tree is encoded via three variables: | ||
##' `node`, `ancestor`, and `time`. | ||
##' The `node` variable gives a name to each node. | ||
##' The `ancestor` variable names the ancestor of each node. | ||
##' The root node has no ancestor (i.e., \code{ancestor=NA}). | ||
##' The variable `time` specifies the temporal location of each node, the root node being at time 0. | ||
##' - **Specifications of selective regimes.** | ||
##' (Columns `OU.1`, `OU.3`, `OU.4`, `OU.LP`). | ||
##' These columns are factors, the levels of which correspond to the \dQuote{paintings} of the respective adaptive regime hypotheses onto the phylogeny (see [paint()]). | ||
##' Each selective regime is named (small, medium, large, etc.). | ||
##' Each column corresponds to a different painting of the selective regimes, and thus to a different hypothesis. | ||
##' In this example, there are 3 alternative models (see Butler & King 2004): `OU.4` is 4-regime model, `OU.3` is 3-regime model (all ancestors are medium), `OU.LP` is the linear parsimony model. | ||
##' - **Other variables.** | ||
##' In addition to the above, there is a two-letter code for each taxon (`spcode`) and the name of the island on which the taxon is found (`island`). | ||
##' | ||
##' @name bimac | ||
##' @rdname bimac | ||
##' @docType data | ||
##' @family examples | ||
##' @format A data frame with 45 observations on the following 11 variables. | ||
##' - `node`: Labels for the nodes. | ||
##' - `spcode`: Two-letter code for each taxon. | ||
##' - `species`: Species names for extant species. | ||
##' - `island`: Name of the island on which the population is found. | ||
##' - `size`: Body size (head length in mm) of extant species. | ||
##' - `ancestor`: Ancestral node. | ||
##' - `time`: Time of node. | ||
##' - `OU.1`: a factor with levels `ns` | ||
##' - `OU.3`: a factor with levels `small`, `medium`, `large` | ||
##' - `OU.4`: a factor with levels `small`, `medium`, `large`, `anc` | ||
##' - `OU.LP`: a factor with levels `small`, `medium`, `large` | ||
##' @author Marguerite A. Butler and Aaron A. King | ||
##' @references | ||
##' \Lazell1972 | ||
##' | ||
##' \Losos1990 | ||
##' @source \Butler2004 | ||
##' @keywords models | ||
##' @example examples/bimac.R | ||
NULL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.