I use length(myVector),but when i want to use for example exp(x.reconstruida[length(myVector)+1:length(myVector)+9]), I need that function returns the number of last element,would then:
if the last position of my vector is 1440 exp(x.reconstruida[1440+1:1440+9] This is what I need, I hope having explained, A gretting, Ignacio. Johannes Graumann-2 wrote: > > myVector <- c(seq(10),23,35) > length(myVector) > myVector[length(myVector)] > > it's unclear to me which of the two you want ... > > HTH, Joh > > yonosoyelmejor 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. > > ______________________________________________ > 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. > > -- View this message in context: http://old.nabble.com/Method-tp26493442p26499919.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.