It isn't entirely clear what you want. Maybe one of these? x <- runif(45) # make a test vector length(x) # position of the last element x[length(x)] # value of the last element
Sarah On Tue, Nov 24, 2009 at 5:18 AM, yonosoyelmejor <yonosoyelme...@hotmail.com> wrote: > > Hello, i would like to ask you another question. Is exist anymethod to > vectors that tells me the last element?That is to say,I have a vector, I > want to return the position of last element. I hope having explained. > > A greeting, > Ignacio. > -- -- Sarah Goslee http://www.functionaldiversity.org ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.