Advertisement
Guest User

Untitled

a guest
Apr 4th, 2012
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.57 KB | None | 0 0
  1. require(zoo)
  2. require(chron)
  3.  
  4. fmt = "%m/%d/%Y %H:%M"
  5. tail1 = function(x) tail(x, 1)
  6.  
  7. old = read.zoo("old.txt", header = F,
  8.    FUN = as.chron, format = fmt,
  9.    colClasses = c(NA, "numeric"),
  10.    sep = "\t", aggregate = tail1)
  11.  
  12. new = read.zoo("new.txt", header = T,
  13.    FUN = as.chron, format = fmt,
  14.    sep = ",",
  15.    colClasses = c("NULL", NA, "numeric",
  16.       "NULL", "NULL",
  17.       "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL",
  18.       "NULL", "NULL", "NULL", "NULL", "NULL", "NULL"),
  19.    aggregate = tail1)
  20.  
  21. rBind = rbind(old, new)
  22. concat = c(old, new)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement