Suppose I have a vector that is nested in a dataframe one or two levels. Is there a quick and dirty way to access the last value, without using the length() fu
length()
I have another method for finding the last element in a vector. Say the vector is a.
a
> a<-c(1:100,555) > end(a) #Gives indices of last and first positions [1] 101 1 > a[end(a)[1]] #Gives last element in a vector [1] 555
There you go!