On Nov 24, 2009, at 3:21 PM, David Winsemius wrote:
On Nov 24, 2009, at 1:44 PM, yonosoyelmejor wrote:
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]
== 1450:(1449+1440)
So that should give you (assuming that you close the expression) a
vector of values, "e" raised to a vector from elements 1441 to 1449,
if such elements have already been defined and are numeric.
Just for the archives and the other newbies like me: Bill Dunlap's
advice makes it clear that (not of the first time) I had forgotten
that ":" has higher precedence than "+". My other advice today (which
was aided by having a workable example) where I did advise that x:(x
+5) was the correct formulation, would also apply here.
?Syntax
--
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
______________________________________________
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.