Commit 3c41005d authored by houyun's avatar houyun
Browse files

deprecate fast_correlate() and anno_link()

parent 1758fca9
Loading
Loading
Loading
Loading
+1 −20
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#' @details The columns of 'x' will be tested for each pair when y is NULL(the default),
#' otherwise each column in 'x' and each column in 'y' is tested for each pair.
#' @return a list with correlation matrix, P values matrix, confidence intervals matrix.
#' @note `fast_correlate()` and `fast_correlate2()` has been deprecated in 0.0.4 version.
#' @importFrom stats cor cor.test p.adjust p.adjust.methods
#' @importFrom purrr walk2
#' @rdname correlate
@@ -208,26 +209,6 @@ correlate <- function(x,
  )
}

#' @rdname correlate
#' @export
fast_correlate <- function(...)
{
  ## Note: will be removed in next version
  warning("fast_correlate() is soft deprecated,\n",
          "please use correlate() instead.", call. = FALSE)
  correlate(..., engine = "WGCNA")
}

#' @rdname correlate
#' @export
fast_correlate2 <- function (...)
{
  ## Note: will be removed in next version
  warning("fast_correlate2() is soft deprecated,\n",
          "please use correlate() instead.", call. = FALSE)
  correlate(..., engine = "picante")
}

#' Print correlate object.
#' @param all if FALSE (default) just print correlation matrix, else will
#'     print all values.

R/deprecated.R

0 → 100644
+27 −0
Original line number Diff line number Diff line
#' @rdname correlate
#' @export
fast_correlate <- function(...)
{
  stop("fast_correlate() is soft deprecated,\n",
       "please use correlate(..., engine = \"WGCNA\") instead.",
       call. = FALSE)
}

#' @rdname correlate
#' @export
fast_correlate2 <- function (...)
{
  ## Note: will be removed in next version
  stop("fast_correlate2() is soft deprecated,\n",
       "please use correlate(..., engine = \"picante\") instead.",
       call. = FALSE)
}

#' @rdname geom_couple
#' @export
anno_link <- function(...) {
  ## Note: will be removed in next version
  stop("`anno_link()` has been deprecated,\n",
       "please use `geom_couple()` instead.",
       call. = FALSE)
}
+1 −10
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@
#' @param offset_x,offset_y NULL or named-list, add a little offset to the node points.
#' @param ... extra parameters passing to layer function.
#' @return a ggplot layer.
#' @note `anno_link()` has been soft deprecated, please use `geom_couple()`
#' @note `anno_link()` has been deprecated in 0.0.4, please use `geom_couple()`
#' instead.
#' @importFrom ggplot2 geom_segment
#' @importFrom ggplot2 geom_text
@@ -42,15 +42,6 @@ geom_couple <- function(data,
            class = "geom_couple")
}

#' @rdname geom_couple
#' @export
anno_link <- function(...) {
  ## Note: will be removed in next version
  warning("`anno_link()` has been deprecated,\n",
          "please use `geom_couple()` instead.", call. = FALSE)
  geom_couple(...)
}

#' @importFrom ggplot2 aes_
#' @importFrom ggplot2 ggplot_add
#' @importFrom ggplot2 expand_limits
+10 −7
Original line number Diff line number Diff line
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/correlate.R
% Please edit documentation in R/correlate.R, R/deprecated.R
\name{correlate}
\alias{correlate}
\alias{fast_correlate}
\alias{fast_correlate2}
\alias{print.correlate}
\alias{print.grouped_correlate}
\alias{fast_correlate}
\alias{fast_correlate2}
\title{Correlate}
\usage{
correlate(
@@ -20,13 +20,13 @@ correlate(
  ...
)

fast_correlate(...)

fast_correlate2(...)

\method{print}{correlate}(x, all = FALSE, ...)

\method{print}{grouped_correlate}(x, all = FALSE, ...)

fast_correlate(...)

fast_correlate2(...)
}
\arguments{
\item{x, y}{a matrix object or NULL.}
@@ -63,6 +63,9 @@ Matrix of Correlations, P-values and confidence intervals
The columns of 'x' will be tested for each pair when y is NULL(the default),
otherwise each column in 'x' and each column in 'y' is tested for each pair.
}
\note{
`fast_correlate()` and `fast_correlate2()` has been deprecated in 0.0.4 version.
}
\examples{
correlate(mtcars)

+8 −8
Original line number Diff line number Diff line
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geom-couple.R
\name{geom_couple}
\alias{geom_couple}
% Please edit documentation in R/deprecated.R, R/geom-couple.R
\name{anno_link}
\alias{anno_link}
\alias{geom_couple}
\alias{nice_curvature}
\title{Link Layer}
\usage{
anno_link(...)

geom_couple(
  data,
  mapping = NULL,
@@ -20,11 +22,11 @@ geom_couple(
  ...
)

anno_link(...)

nice_curvature(curvature, by = "to")
}
\arguments{
\item{...}{extra parameters passing to layer function.}

\item{data}{a data frame.}

\item{mapping}{aesthetic mappings parameters.}
@@ -37,8 +39,6 @@ nice_curvature(curvature, by = "to")

\item{offset_x, offset_y}{NULL or named-list, add a little offset to the node points.}

\item{...}{extra parameters passing to layer function.}

\item{curvature}{a numeric value giving the amount of curvature.}

\item{by}{one of "from" or "to". Compute the best curvature based on
@@ -51,7 +51,7 @@ a ggplot layer.
Function to draw mantel test plot on a correlation matrix heatmap.
}
\note{
`anno_link()` has been soft deprecated, please use `geom_couple()`
`anno_link()` has been deprecated in 0.0.4, please use `geom_couple()`
instead.
}
\author{