I have a data frame and a list which is as such:
> df
value
1 5
2 25
3 6
4 70
And list:
> y
[[1]]
[1] 5 6 70 25
[[2]]
[1] 6 70 5 25
How do I make the list return the index of each elements such that it is:
> y
[[1]]
[1] 1 3 4 2
[[2]]
[1] 3 4 1 2