Skip to content

Instantly share code, notes, and snippets.

@joshuaulrich
Created May 21, 2015 00:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshuaulrich/3c50eb98386c7d3b812d to your computer and use it in GitHub Desktop.
Save joshuaulrich/3c50eb98386c7d3b812d to your computer and use it in GitHub Desktop.
Return all non-index attributes for xts objects, in sorted order
nonIndexAttr <- function(x) {
a <- attributes(x)
n <- names(a)[!names(a) %in% "index"]
a[sort(n)]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment