Advertisement
Guest User

Untitled

a guest
Apr 4th, 2012
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.71 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("old1.txt", header = T,
  8.    FUN = as.chron, format = fmt,
  9.    sep = ",",
  10.    colClasses = c("NULL", NA, "numeric",
  11.       "NULL", "NULL",
  12.       "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL",
  13.       "NULL", "NULL", "NULL", "NULL", "NULL", "NULL"),
  14.    aggregate = tail1)
  15.  
  16. new = read.zoo("new.txt", header = T,
  17.    FUN = as.chron, format = fmt,
  18.    sep = ",",
  19.    colClasses = c("NULL", NA, "numeric",
  20.       "NULL", "NULL",
  21.       "NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL",
  22.       "NULL", "NULL", "NULL", "NULL", "NULL", "NULL"),
  23.    aggregate = tail1)
  24.  
  25. rBind = rbind(old, new)
  26. concat = c(old, new)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement