R/pow.R

Defines functions pow

Documented in pow

#' Square a vector
#'
#' That's it -- this function raises a vector to a power.
#'
#' @param x The vector to be squared.
#'
#' @return A vector that is the square of \code{x}.
#'
#' @details
#' This function isn't complicated.
#'
#' And it almost certainly doesn't need two paragraphs in the "Details"
#' section!
#'
#' Here are some reasons why putting a list in this section is excessive:
#' \itemize{
#'      \item This \code{square} function is quite simple.
#'      \item There's nothing else to say about \code{square}.
#' }
#'
#' @examples
#' pow(1:10)
#' pow(-5)
#' @export
pow <- function(x, a = 2)
res <- x^a
p <- ggplot2::qplot(x, res)
print(p)
return(res)
rdwyer2/powers documentation built on Nov. 24, 2017, 12:05 a.m.