sum_or_na: Sum a vector, or return NA if it has no values

View source: R/utils.R

sum_or_naR Documentation

Sum a vector, or return NA if it has no values

Description

Sum a vector, or return NA if it has no values

Usage

sum_or_na(x)

Arguments

x

A numeric vector. Non-finite values (NA, Inf, -Inf) are ignored.

Value

The sum of the finite values of x, or NA if there are none.


gtfstools documentation built on Oct. 28, 2026, 5:13 p.m.