R-CMD-check / R CMD check (pull_request) Failing after 1m13s
- Add jsonlite to Imports (used by beep() webhook) - Add importFrom(utils, flush.console) to NAMESPACE - Update na_sum.Rd to include quiet parameter - Create beep.Rd documentation
27 lines
705 B
R
27 lines
705 B
R
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/utils.R
|
|
\name{na_sum}
|
|
\alias{na_sum}
|
|
\title{Sum a numeric that contains missing values and ignore missing values}
|
|
\usage{
|
|
na_sum(x, quiet = FALSE)
|
|
}
|
|
\arguments{
|
|
\item{x}{a numeric vector}
|
|
|
|
\item{quiet}{Logical. If \code{TRUE} (default \code{FALSE}), suppress the warning
|
|
message. Useful when calling \code{na_sum()} inside a loop or \code{dplyr} pipeline
|
|
where the message would be emitted repeatedly.}
|
|
}
|
|
\value{
|
|
the sum, ignoring any missing values
|
|
}
|
|
\description{
|
|
Sum a numeric that contains missing values and ignore missing values
|
|
}
|
|
\examples{
|
|
x <- c(2, NA, 4, 9)
|
|
na_sum(x) # 15
|
|
na_sum(x, quiet = TRUE) # 15 (no message)
|
|
}
|