El dom., 5 ago. 2018 a las 6:27, Kenny Bell () escribió:
>
> This should more clearly illustrate the issue:
>
> c(1, 2, 3, 4)[-seq_len(4)]
> #> numeric(0)
> c(1, 2, 3, 4)[-seq_len(3)]
> #> [1] 4
> c(1, 2, 3, 4)[-seq_len(2)]
> #> [1] 3 4
> c(1, 2, 3, 4)[-seq_len(1)]
> #> [1] 2 3 4
> c(1, 2, 3, 4)[-s
Thanks,
This is what I needed.
I had read the R Inferno a long time ago and apparently forgot this one.
Rui Barradas
Às 08:46 de 05/08/2018, Patrick Burns escreveu:
This is Circle 8..1.13 of the R Inferno.
On 05/08/2018 06:57, Rui Barradas wrote:
Thanks.
This is exactly the doubt I had.
Ru
This is Circle 8..1.13 of the R Inferno.
On 05/08/2018 06:57, Rui Barradas wrote:
Thanks.
This is exactly the doubt I had.
Rui Barradas
Às 05:26 de 05/08/2018, Kenny Bell escreveu:
This should more clearly illustrate the issue:
c(1, 2, 3, 4)[-seq_len(4)]
#> numeric(0)
c(1, 2, 3, 4)[-seq_len