You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the 0.10.* release series, Rcpp contains a new sugar function `clamp`
11
11
which can be used to limit vectors to both a minimum and maximim value.
12
-
[This recent StackOverflow question](http://stackoverflow.com/questions/13868963/clip-values-between-a-minimum-and-maximum-allowed-value-in-r/13870367#13870367) permitted `clamp` to
13
-
shine. We retake some of the answers, including the `clamp` entry
14
-
by Romain.
12
+
[This recent StackOverflow question](http://stackoverflow.com/questions/13868963/clip-values-between-a-minimum-and-maximum-allowed-value-in-r/) permitted `clamp` to
13
+
shine. We retake some of the answers, including the `clamp`[entry by Romain](http://stackoverflow.com/questions/13868963/clip-values-between-a-minimum-and-maximum-allowed-value-in-r/13870367#13870367).
15
14
16
15
We first define the three R versions.
17
16
@@ -76,10 +75,10 @@ benchmark(pminpmaxClamp(x, a, b),
Copy file name to clipboardExpand all lines: src/2013-01-07-sugar-function-clamp.cpp
+2-3
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,8 @@
8
8
*
9
9
* Since the 0.10.* release series, Rcpp contains a new sugar function `clamp`
10
10
* which can be used to limit vectors to both a minimum and maximim value.
11
-
* [This recent StackOverflow question]() permitted `clamp` to
12
-
* shine. We retake some of the answers, including the `clamp` entry
13
-
* by Romain.
11
+
* [This recent StackOverflow question](http://stackoverflow.com/questions/13868963/clip-values-between-a-minimum-and-maximum-allowed-value-in-r/) permitted `clamp` to
12
+
* shine. We retake some of the answers, including the `clamp` [entry by Romain](http://stackoverflow.com/questions/13868963/clip-values-between-a-minimum-and-maximum-allowed-value-in-r/13870367#13870367).
0 commit comments