-
-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Constructors should not allow NA in index #173
Comments
And thanks to @kylebalkissoon for the (offline) discussion and reproducible example that helped track down this bug. |
joshuaulrich
added a commit
that referenced
this issue
May 16, 2017
Several xts functions expect all index values to be finite. The most important of them is merge.xts(). The constructors now error if any potential index values are NA, NaN, or +/-Inf. Fixes #173.
joshuaulrich
added a commit
that referenced
this issue
Jun 26, 2017
The check for finite index values was very early in the xts constructor, which could cause problems if order.by wasn't strictly a numeric vector (e.g. if it was POSIXlt--a list). This was to ensure the index doesn't contain +/-Inf, NA, or NaN (see #173). Move the check until after the index has been converted to POSIXct/numeric, so we can be certain it is a numeric vector. Fixes #194.
joshuaulrich
added a commit
that referenced
this issue
Jun 26, 2017
The check for finite index values was very early in the xts constructor, which could cause problems if order.by wasn't strictly a numeric vector (e.g. if it was POSIXlt--a list). This was to ensure the index doesn't contain +/-Inf, NA, or NaN (see #173). Move the check until after the index has been converted to POSIXct/numeric, so we can be certain it is a numeric vector. Fixes #194.
joshuaulrich
added a commit
that referenced
this issue
Jun 26, 2017
The check for finite index values was very early in the xts constructor, which could cause problems if order.by wasn't strictly a numeric vector (e.g. if it was POSIXlt--a list). This was to ensure the index doesn't contain +/-Inf, NA, or NaN (see #173). Move the check until after the index has been converted to POSIXct/numeric, so we can be certain it is a numeric vector. Fixes #194.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Both
xts()
and.xts()
allow vectors withNA
to be passed toorder.by
.merge.xts()
throws an error if there areNA
in the index, so the constructors should not allow them.The text was updated successfully, but these errors were encountered: