Skip to content

Commit

Permalink
move some codes
Browse files Browse the repository at this point in the history
  • Loading branch information
GuangchuangYu committed Oct 24, 2024
1 parent 01b29ef commit 8798543
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 212 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: ggtree
Type: Package
Title: an R package for visualization of tree and annotation data
Version: 3.13.1
Version: 3.13.2
Authors@R: c(
person("Guangchuang", "Yu", email = "[email protected]", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0002-6485-8781")),
Expand Down Expand Up @@ -31,7 +31,7 @@ Imports:
methods,
purrr,
rlang,
ggfun (>= 0.1.5),
ggfun (>= 0.1.7),
yulab.utils (>= 0.1.6),
tidyr,
tidytree (>= 0.4.5),
Expand Down
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ importFrom(dplyr,select)
importFrom(ggfun,"%<+%")
importFrom(ggfun,get_aes_var)
importFrom(ggfun,identify)
importFrom(ggfun,td_filter)
importFrom(ggfun,td_mutate)
importFrom(ggfun,td_unnest)
importFrom(ggplot2,Geom)
importFrom(ggplot2,GeomLabel)
importFrom(ggplot2,GeomPoint)
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
-->

# ggtree 3.13.2

+ mv `td_filter()`, `td_unnest()` and `td_mutate()` to 'ggfun' package (2024-10-24, Thu)

# ggtree 3.13.1

+ layout argument can be a function to re-calculate the coord of nodes (2024-07-27, Sat, #622)
Expand Down
79 changes: 46 additions & 33 deletions R/reexports.R
Original file line number Diff line number Diff line change
@@ -1,58 +1,71 @@
##' @importFrom ggfun %<+%
##' @export
##' @examples
##' nwk <- system.file("extdata", "sample.nwk", package="treeio")
##' tree <- read.tree(nwk)
##' p <- ggtree(tree)
##' dd <- data.frame(taxa=LETTERS[1:13],
##' place=c(rep("GZ", 5), rep("HK", 3), rep("CZ", 4), NA),
##' value=round(abs(rnorm(13, mean=70, sd=10)), digits=1))
##' row.names(dd) <- NULL
##' p %<+% dd + geom_text(aes(color=place, label=label), hjust=-0.5)
#' @importFrom ggfun %<+%
#' @export
#' @examples
#' nwk <- system.file("extdata", "sample.nwk", package="treeio")
#' tree <- read.tree(nwk)
#' p <- ggtree(tree)
#' dd <- data.frame(taxa=LETTERS[1:13],
#' place=c(rep("GZ", 5), rep("HK", 3), rep("CZ", 4), NA),
#' value=round(abs(rnorm(13, mean=70, sd=10)), digits=1))
#' row.names(dd) <- NULL
#' p %<+% dd + geom_text(aes(color=place, label=label), hjust=-0.5)
ggfun::`%<+%`

##' @importFrom magrittr %>%
##' @export
#' @importFrom ggfun td_filter
#' @export
ggfun::td_filter

#' @importFrom ggfun td_mutate
#' @export
ggfun::td_mutate

#' @importFrom ggfun td_unnest
#' @export
ggfun::td_unnest


#' @importFrom magrittr %>%
#' @export
magrittr::`%>%`

##' @importFrom ape rtree
##' @export
#' @importFrom ape rtree
#' @export
ape::rtree

##' @importFrom ape read.tree
##' @export
#' @importFrom ape read.tree
#' @export
ape::read.tree

##' @importFrom tidytree groupOTU
##' @export
#' @importFrom tidytree groupOTU
#' @export
tidytree::groupOTU

##' @importFrom tidytree groupClade
##' @export
#' @importFrom tidytree groupClade
#' @export
tidytree::groupClade

##' @importFrom tidytree nodeid
##' @export
#' @importFrom tidytree nodeid
#' @export
tidytree::nodeid

##' @importFrom tidytree nodelab
##' @export
#' @importFrom tidytree nodelab
#' @export
tidytree::nodelab

##' @importFrom tidytree MRCA
##' @export
#' @importFrom tidytree MRCA
#' @export
tidytree::MRCA

##' @importFrom dplyr collapse
##' @export
#' @importFrom dplyr collapse
#' @export
dplyr::collapse

##' @importFrom ggplot2 fortify
##' @export
#' @importFrom ggplot2 fortify
#' @export
ggplot2::fortify

##' @importFrom ggplot2 ggplot
##' @export
#' @importFrom ggplot2 ggplot
#' @export
ggplot2::ggplot

##' @importFrom ggplot2 xlim
Expand Down
72 changes: 0 additions & 72 deletions R/treedata-function.R

This file was deleted.

5 changes: 4 additions & 1 deletion man/reexports.Rd

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

40 changes: 0 additions & 40 deletions man/td_filter.Rd

This file was deleted.

27 changes: 0 additions & 27 deletions man/td_mutate.Rd

This file was deleted.

37 changes: 0 additions & 37 deletions man/td_unnest.Rd

This file was deleted.

0 comments on commit 8798543

Please sign in to comment.