Skip to content

Commit

Permalink
fixing PD deficit function
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielNakamura committed Mar 16, 2024
1 parent 33785df commit 1a1385c
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 164 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.1
RoxygenNote: 7.2.3
Imports:
ape,
fishtree,
geiger,
knitr,
magrittr,
phytools,
progress,
rfishbase,
Expand All @@ -41,4 +42,3 @@ Suggests: markdown,
gh
Remotes:
Otoliths/rFishTaxa

2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
export(FishPhyloMaker)
export(FishTaxaMaker)
export(PD_deficit)
export(PD_deficit_2)
export(whichFishAdd)
importFrom(magrittr,"%>%")
importFrom(stats,na.omit)
9 changes: 9 additions & 0 deletions R/PD_deficit_2.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,18 @@
#' @param data data frame with species and insertion levels. This is the output of FishPhyloMaker function
#'
#' @return a list with two tibbles. One with results of deficit for all species and another with summary results for each category of insertion
#' @importFrom magrittr "%>%"
#' @return a list containing two data frames.
#'
#' - a long data frame (pd_deficit_long) containing all values of deficit and total phylogenetic diversity
#' accounted by each terminal branch of the tree.
#'
#' - a summary data frame with values of total PD in each category of insertion (including for those species present in tree)
#' and a proportion of each category for the total terminal PD.
#' @export
#'
#' @examples
#'
PD_deficit_2 <-
function(phylo, data){
tree_tib <- tidytree::as_tibble(phylo) # change to a tibble object
Expand Down
19 changes: 0 additions & 19 deletions R/PD_deficit_curves.R

This file was deleted.

138 changes: 0 additions & 138 deletions R/search_catalog_v1.R

This file was deleted.

4 changes: 3 additions & 1 deletion man/FishPhyloMaker.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions man/FishTaxaMaker.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion man/PD_deficit.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions man/PD_deficit_2.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1a1385c

Please sign in to comment.