library(mvtnorm) # you were misusing "require"... only use require if
you plan to
library(ggplot2) # test the return value and fail gracefully when the
package is missing
set.seed( 1234 )
xx <- data.frame( rmvt( 100, df = c( 13, 13 ) ) )
xx2 <- expand.grid( X1 = seq( -5, 5, 0.1 ) # all combinati
Another way:
#create four columns with route id, stop sequence interval time and
route start time
ssq <- c( 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 2, 3, 4, 5, 6, 7, 8 )
tint <- c( "00:00", "00:12", "00:03", "00:06", "00:09", "00:02", "00:04"
, "00:00", "00:08", "00:10", "00:10"
, "0
I agree with Bert. It is not clear what is generating a need for this
sequence, so it
is difficult to see what aspects need to be adjustable. If this specific
sequence is the only one you need, then Bert's code looks "elegant" to
me.
One note: "c" is a base function in R. Functions in R are fi
If "any idea of a for loop is disastrous," why are you using apply,
which is basically a for loop?
I think you have framed the question in such a way that loops are
inevitable. You are already using the LHS as a matrix, which is the
main speedup I could think of. However, you can avoid some s
Inline below...
On Mon, 28 Nov 2011 21:32:21 -0800 (PST), Chris Conner
wrote:
Dear Help-Rs,
I have data similar to the following:
DF <- structure(list(X = 1:22, RESULT = structure(c(2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L), .Label = c("NEG", "
5 matches
Mail list logo