Answers for "get last n elements of vector in r"

R
2

r last value of vector

x[length(x)] # fastest
tail(x, 1)   # easiest
Posted by: Guest on March-01-2021

Code answers related to "get last n elements of vector in r"

Browse Popular Code Answers by Language