{"action":"opened","issue":{"url":"https://api.github.com/repos/joshuaulrich/xts/issues/25","labels_url":"https://api.github.com/repos/joshuaulrich/xts/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/joshuaulrich/xts/issues/25/comments","events_url":"https://api.github.com/repos/joshuaulrich/xts/issues/25/events","html_url":"https://github.com/joshuaulrich/xts/issues/25","id":58825816,"number":25,"title":"[R-Forge #1212] na.locf with maxgap does not work for xts","user":{"login":"joshuaulrich","id":1023193,"avatar_url":"https://avatars.githubusercontent.com/u/1023193?v=3","gravatar_id":"","url":"https://api.github.com/users/joshuaulrich","html_url":"https://github.com/joshuaulrich","followers_url":"https://api.github.com/users/joshuaulrich/followers","following_url":"https://api.github.com/users/joshuaulrich/following{/other_user}","gists_url":"https://api.github.com/users/joshuaulrich/gists{/gist_id}","starred_url":"https://api.github.com/users/joshuaulrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshuaulrich/subscriptions","organizations_url":"https://api.github.com/users/joshuaulrich/orgs","repos_url":"https://api.github.com/users/joshuaulrich/repos","events_url":"https://api.github.com/users/joshuaulrich/events{/privacy}","received_events_url":"https://api.github.com/users/joshuaulrich/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joshuaulrich/xts/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-24T23:44:39Z","updated_at":"2015-02-24T23:44:39Z","closed_at":null,"body":"Submitted by: Koert Kuipers\nAssigned to: Nobody\n[R-Forge link](http://r-forge.r-project.org/tracker/index.php?func=detail&aid=1212&group_id=118&atid=516)\n\nHey Jeff,\nJust a minor bug we ran into today. This might be a zoo bug. Not sure...\nBest, Koert\n\n> library(xts)\nLoading required package: zoo\n> a <- xts(c(1,2,3,NA,NA,NA,4,5), Sys.Date()+1:8)\n> na.locf(a, maxgap=2)\n           [,1]\n2010-11-19    1\n2010-11-20    2\n2010-11-21    3\n2010-11-22    3\n2010-11-23    3\n2010-11-24    3\n2010-11-25    4\n2010-11-26    5\n> na.locf(as.zoo(a), maxgap=2)\n2010-11-19 2010-11-20 2010-11-21 2010-11-22 2010-11-23 2010-11-24 2010-11-25 \n         1          2          3         NA         NA         NA          4 \n2010-11-26 \n         5 \n> \n\nFollowups:\n\nDate: 2010-11-21 03:55\nSender: Jeff Ryan\nThanks Koert.  Patched on R-forge now to behave like zoo.  xout= I am not too sure can be supported easily in C, so it won't be in xts for the time being.\n\n> packageVersion('xts')\n[1] ‘0.7.6.11’\n> na.locf(a, maxgap=2)\n           [,1]\n2010-11-21    1\n2010-11-22    2\n2010-11-23    3\n2010-11-24   NA\n2010-11-25   NA\n2010-11-26   NA\n2010-11-27    4\n2010-11-28    5\n"}}