R: Occurrence times -> binary sequence? -


What are the better options for converting a non-decreasing sequence of incident time to 0-1 CEC? Thank you.

  D & lt; -c (3,5 9, 12, 15); C (Rep (0 (0, D [1] -1, Unlisted (RBIDID (Mapple (Rep., 0, DIFFED (D) -1), 1)))  

I think it should do the same

  d <- c ( 3,5,9, 12,15); x and lt; - integer (max) (d)) # integer vector where all entries are zero;  
= Max (D) (or the last element of D) X [D] <- 1 l # set x to each position

Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -