% 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) }