Created
August 9, 2012 01:02
-
-
Save dalejung/3300119 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If your data.frame index is unordered and you only have one column. This portion of xts will error. | |
if(!is.null(x) && !isOrdered(order.by, strictly=!unique) ) { | |
indx <- order(order.by) | |
if(NCOL(x) > 1 || is.matrix(x)) { | |
x <- x[indx,] | |
} else x <- x[indx] | |
order.by <- order.by[indx] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment