Thanks for the tips.
Still, Range() is the correct way to write:
NumericVector my_vec(200);
my_vec(Range(0,10)) = 10;
?
Thanks in advance
--
Francisco Bischoff, MD, MSc
Faculty of Medicine of the University of Porto, Portugal
- Master of Medical Informatics | topic: time series
- Research
Hello,
About the Range() function, I think it should handle decreasing ranges
too...
But, idk if using Matlabs approach or R approach:
R's:
a <- 1
b <- 10
print(a:b)
1 2 3 4 5 6 7 8 9 10
print(b:a)
10 9 8 7 6 5 4 3 2 1
Matlab's
a = 1;
b = 10;
disp(a:b);
1 2 3 4 5 6 7 8 9 10
disp(b:a);
numeric(
On 16 January 2021 at 01:35, Francisco Bischoff wrote:
| About the Range() function, I think it should handle decreasing ranges
| too...
| But, idk if using Matlabs approach or R approach:
|
| R's:
|
| a <- 1
| b <- 10
|
| print(a:b)
| 1 2 3 4 5 6 7 8 9 10
| print(b:a)
| 10 9 8 7 6 5 4 3 2 1
|
Rcpp 1.0.6 is now on CRAN, following the six months release cycle adopted in
July.
A brief blog post is at http://dirk.eddelbuettel.com/blog/2021/01/15#rcpp_1.0.6
and you know where to find it :)
My thanks to Walter Somerville, Mattias Ellert and Benjamin Christoffersen
for three fine PRs rounde