Let `elems` argument of `rownth()` expand to corresponding length if length is 1
Opened this issue · 1 comments
psychelzh commented
For example:
set.seed(123)
x <- matrix(rnorm(1000), nrow = 10)
Rfast::rownth(x, 1)
#> [1] -2.809775
# expect this instead:
Rfast::rownth(x, rep(1, nrow(x)))
#> [1] -2.809775 -2.309169 -1.943651 -1.779977 -2.249051 -2.660923 -2.014210
#> [8] -2.070751 -2.465898 -2.078489
Created on 2024-04-15 with reprex v2.1.0
ManosPapadakis95 commented
I will think about it. The reason i didn't do it is because i want be clear that each cell of that argument corresponds to each row.