Skip to content

Commit

Permalink
270 fix len logic2 (#1)
Browse files Browse the repository at this point in the history
* Fix if class(order.by) > 1

When class(order.by) has a length other than one, it will reach this
line but only the first element will be used.  We should make this
explicit and indeed must in case the environment variable _R_CHECK_LENGTH_1_LOGIC2_ is set, whereupon this line will emit an error
or warning.
  • Loading branch information
HughParsonage authored Sep 27, 2018
1 parent 9a4ab88 commit f88fe13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/xts.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function(x=NULL,
x <- as.matrix(x)
} else x <- numeric(0)

if(orderBy == "timeDate" && missing(tzone)) {
if(orderBy[1L] == "timeDate" && missing(tzone)) {
tzone <- order.by@FinCenter
} else
if(!is.null(attr(order.by,"tzone")) && missing(tzone))
Expand Down

0 comments on commit f88fe13

Please sign in to comment.