Displaying 2 results from an estimated 2 matches for "myseq2".
Did you mean:
myseq
2005 Nov 17
1
Predicting and Plotting "hypothetical" values of factors
...you expected to see the point appear at (2,.4), but in the plot
# it appears at (4.5,.4). Huh?
# The actual values being plotted are the integer-valued levels that
# R uses for factors, the numbers you get from as.numeric(myfac).
# So it is only necessary to re-scale the sequence by adding one.
myseq2 <- 1 + myseq
lines( myseq2, p2, type="l" )
#Its not all that S-shaped, but you have to take what you can get! :)
-----------------------------
--
Paul E. Johnson email: pauljohn at ku.edu
Dept. of Political Science http://lark.cc.ku.edu/~pauljohn
1...
2008 Jan 07
3
Seeking a more efficient way to find partition maxima
Hi.
Suppose I have a vector that I partition into disjoint, contiguous subvectors. For example, let v = c(1,4,2,6,7,5), partition it into three subvectors, v1 = v[1:3], v2 = v[4], v3 = v[5:6]. I want to find the maximum element of each subvector. In this example, max(v1) is 4, max(v2) is 6, max(v3) is 7. If I knew that the successive subvector maxima would never decrease, as in the example,