STL Transform
Dirk Eddelbuettel —
written Dec 28, 2012 —
source
The STL transform function can be used to pass a single function over
a vector. Here we use a simple function square()
.
[1] 1 4 9 16
A second variant combines two input vectors.
[1] 2.236 2.828 4.243 5.000
tags:
stl
Related Articles