[R] Method
David Winsemius
dwinsemius at comcast.net
Tue Nov 24 16:41:35 CET 2009
On Nov 24, 2009, at 10:20 AM, Keo Ormsby wrote:
> yonosoyelmejor escribió:
>> 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.
>>
> vect1 <- c(1,2,3)
> vect1[length(vect1)]
As well as:
tail(vect1, 1)
>
--
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
More information about the R-help
mailing list