Learn R Programming

gtfstools (version 2.0.1)

sum_or_na: 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)

Value

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

Arguments

x

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