Version: 0.60-35
Date: 2016-02-29
Title: Jack-Knife Support for Evolutionary Distinctiveness Indices I and W
Author: Daniel R. Miranda-Esquivel
Maintainer: Daniel R. Miranda-Esquivel <dmiranda@uis.edu.co>
Depends: ape
Description: These functions calculate the taxonomic measures presented in Miranda-Esquivel (2016). The package introduces Jack-knife resampling in evolutionary distinctiveness prioritization analysis, as a way to evaluate the support of the ranking in area prioritization, and the persistence of a given area in a conservation analysis. The algorithm is described in: Miranda-Esquivel, D (2016) <doi:10.1007/978-3-319-22461-9_11>.
License: GPL-3
URL: https://github.com/Dmirandae/jrich
BugReports: https://github.com/Dmirandae/jrich/issues
LazyData: false
RoxygenNote: 5.0.1
NeedsCompilation: no
Packaged: 2016-03-06 04:22:27 UTC; rafael
Repository: CRAN
Date/Publication: 2016-03-06 17:50:38

Jack-knife indices in a single topology m times and evaluates a success rule.

Description

The function jack-knifes the terminals and calculates the indices value m (=replicates) times.

Usage

Best.Index(tree = tree, distribution = distribution, jtip = jtip,
  replicates = replicates, success = c(success))

Arguments

tree

is a single tree with n terminals, an ape phylo object.

distribution

species distributions in n areas, a data.frame

jtip

is the proportion of terminals to delete, real (range 0-1).

replicates

is the number of replicates, an integer.

success

the measure of the success, a vector.

Value

The function returns the success that correspond to obtain the same ranking for X,Y positions, established as the vector success (by default success)).

The function returns the success that corresponds to obtain the same ranking for X,Y positions, established as the vector success (by default success))

Author(s)

Miranda-Esquivel Daniel R.

Examples

library(jrich)
data(tree)
data(distribution)

Best.Index(tree = tree, distribution = distribution, jtip =0.5, replicates =10, success=1)



Indices values and Jack-knife indices for a single topology.

Description

The funtion calculates standard and terminal jack-knifed indices I and W [see Miranda-Esquivel 2016], along with Posadas et al. 2001 modifications.

Usage

Calculate.Index(tree = tree, distribution = distribution, jtip = 0,
  verbose = TRUE, standard = "distribution")

Arguments

tree

is a single tree with n terminals, an ape phylo object.

distribution

species distributions in n areas, a data.frame

jtip

is the proportion of terminals to delete, real (range 0-1).

verbose

Boolean. If TRUE, the output reports the number of deleted terminals/topologies.

standard

"distribution" or "tree" to standarize by the by the sum of indices in the distribution or the sum of indices in the tree

Author(s)

Miranda-Esquivel Daniel R.

Examples

library(jrich)
data(tree)
data(distribution)
## Standarized by the sum of indices in the distribution
Calculate.Index(tree=tree, distribution = distribution, verbose=TRUE, standard = "distribution")

## Standarized by the sum of indices in the tree (as figure 1 in Miranda-Esquivel 2016)
Calculate.Index(tree=tree, distribution = distribution, verbose=TRUE, standard = "tree")



Children of a node.

Description

Get the children of a node in a tree.

Usage

Children(tree = tree, node = node)

Arguments

tree

is a single tree with n terminals, an ape phylo object.

node

representing the node in APE notation,is an integer.

Value

The children nodes of the internal node; in most cases, two integers.

Author(s)

Miranda-Esquivel Daniel R.

Examples

 library(jrich)
 data(tree)

Children(tree,7)


I index value for a single topology.

Description

This function assigns the same weight to sister clades (see Van-Wright et al., 1981). The input tree is reordered in post order.

Usage

IndexI(tree = tree)

Arguments

tree

is a single tree with n terminals, an ape phylo object.

Value

Returns a vector with weights.

Author(s)

Miranda-Esquivel Daniel R.

Examples

 library(jrich)
 data(tree)
 plot(tree)
 indexi               <- IndexI(tree)
 newTree              <- tree
 newTree$tip.label    <- indexi
 plot(newTree)
 



W index value for a single topology.

Description

This function assigns the weight according to the ramification patterns (see Van-Wright et al., 1981). The input tree is reordered in post order. Returns a vector with weights.

Usage

IndexW(tree = tree)

Arguments

tree

is a single tree with n terminals, an ape phylo object.

Author(s)

Miranda-Esquivel Daniel R.

Examples

  library(jrich)
  data(tree)
  plot(tree)
  indexw             <- IndexW(tree)
  newTree            <- tree
  newTree$tip.label  <- indexw
  plot(newTree)
  



Jack-knife indices in n topologies one time.

Description

The function calculates the indices values for a MultiData list one time.

Usage

Multi.Index.Calc(MultiData = MultiData, jtip = 0, jtopol = 0)

Arguments

MultiData

is the list of Trees and distributions to evaluate, a list object.

jtip

is the proportion of terminals to delete, real (range 0-1).

jtopol

is the proportion of topologies to delete, real (range 0-1).

Value

Returns the indices values.

Author(s)

Miranda-Esquivel Daniel R.

Examples

 ## get the library
 library(jrich)
 
 ## load the data
 data(Multitaxon1) 

 Multi.Index.Calc(Multitaxon1, jtip = 0, jtopol = 0)


Jack-knife indices in n topologies m times.

Description

The function calculates the indices values for a MultiData list m (=replicates) times

Usage

Multi.Jack(MultiData = MultiData, times = 100, jtip = 0, jtopol = 0)

Arguments

MultiData

is the list of Trees and distributions to evaluate, a list object.

times

in the number of times to repeat the process, an integer.

jtip

is the proportion of terminals to delete, real (range 0-1).

jtopol

is the proportion of topologies to delete, real (range 0-1).

Author(s)

Miranda-Esquivel Daniel R.

Examples

 ## get the library
 library(jrich)
 
 ## load the data
 data(Multitaxon1) 

Multi.Jack(Multitaxon1, jtip=0.25)


Multitaxon example.

Description

A multitaxon example with two hypothetical taxa / distributions

Usage

Multitaxon1

Format

A list with two objects, each with an APE object, class phylo and the distribution of the terminals.

Author(s)

Miranda-Esquivel Daniel R.


Rank indices.

Description

Renk indices according to the areas' absolute position. If the index value is empty, the function assigns a dummy position "X0X"

Usage

Rank.Indices(index.Value = index.Value)

Arguments

index.Value

a table with indices values.

Value

a table with the decreasing order of the areas It presents the ties alphabetically

Author(s)

Miranda-Esquivel Daniel R.

Examples

 ## get the library
 library(jrich)
 
 ## load the data
 data(tree) 
 data(distribution) 
 
Rank.Indices(Calculate.Index(tree=tree, distrib = distribution, verbose=FALSE))


Read distributions.

Description

Read distributions as a csv with two columns species and area

Usage

Read.Data(data.File)

Arguments

data.File

a csv file to read

Value

a data.frame object with the distribution by species

Author(s)

Miranda-Esquivel Daniel R.


Sums two tables with indices values.

Description

You input two tables with indices and it function returns a single table with the sum.

Usage

Sum.Indices.2.Topologies(indices1 = indices1, indices2 = indices2)

Arguments

indices1

a table of indices values.

indices2

a table of indices values.

Value

a single table with the sum of the two indices.

Author(s)

Miranda-Esquivel Daniel R.

Examples


 ## get the library
 library(jrich)
 
 ## load the data
 data(Multitaxon1) 
 
 ## calculate indices for two trees and their distributions
 temp.Index.Value1 <- Calculate.Index(tree = Multitaxon1[[1]][[1]],
                                      distribution = Multitaxon1[[1]][[2]],0)

 temp.Index.Value2 <- Calculate.Index(tree = Multitaxon1[[2]][[1]],
                                      distribution = Multitaxon1[[2]][[2]],0)
 
 ## sum the indices values
 Sum.Indices.2.Topologies(temp.Index.Value1, temp.Index.Value2)
 


Distribution of five taxa.

Description

A data frame with five species distributions in eight areas, following Miranda-Esquivel (2016).

Usage

distribution

Format

A data.frame object with eight areas (columns) and five species (rows)

Author(s)

Miranda-Esquivel Daniel R.


A tree and the distribution of the taxa.

Description

A list with two objects: Taxon[[1]]: A tree as an APE object with five terminals and Taxon[[2]]: A data frame with five species distributions in eight areas, following Miranda-Esquivel (2016).

Usage

taxon1

Format

A list with two objects

Author(s)

Miranda-Esquivel Daniel R.


A tree with five terminals.

Description

A tree as an APE object with five terminals, following Miranda-Esquivel (2016).

Usage

tree

Format

An APE object, class phylo. A tree dataset with five terminals.

Author(s)

Miranda-Esquivel Daniel R.