Skip to contents

Passes a numeric vector to a Fortran routine that returns its sum, and surfaces the result in R through Rcpp.

Usage

fortran_sum(x)

Arguments

x

A numeric vector.

Value

A single numeric value, the sum of the elements of x.

Examples

fortran_sum(1:10)
#> [1] 55