R/discretise.traits.R

# TODO: just a draft placeholder

# #' @title Discretises a continuous trait
# #'
# #' @description Transforms a continuous trait into a discrete one, either directly by modifying a \code{process} (see \code{\link{make.traits}}) or a posteriori by modifying a \code{\link{treats}} output.
# #'
# #' @param trait                 Either a \code{treats} object or a \code{function} to be passed as the \code{process} argument to \code{\link{make.traits}}
# #' @param transition.matrix     Either a squared matrix that represent the transition rates between available states; or a list containing the name of an inbuilt transition matrix and a number of states (see details).
# #' 
# #' @details
# #' If the input is a \code{treats} object containing continuous traits, each trait value is changed to a discrete one by multiplying the trait value by the transition matrix and collating to the highest score TODO
# #'
# #' If the input is a \code{process} function (to be passed to \code{\link{make.traits}}), a new character state is generated by multiplying `x0` and the transition probability scaled by branch length. E.g. if the original state is `0`
# #' 
# #' @examples
# #' 
# #' @author Thomas Guillerme
# #' @export

# discretise.traits <- function(x, state.matrix) {

# }

Try the treats package in your browser

Any scripts or data that you put into this service are public.

treats documentation built on Nov. 24, 2023, 5:08 p.m.