X Tutup
Skip to content

fix NA introduced into position#565

Merged
renkun-ken merged 1 commit intoREditorSupport:masterfrom
andyquinterom:fix_NA
Jul 27, 2022
Merged

fix NA introduced into position#565
renkun-ken merged 1 commit intoREditorSupport:masterfrom
andyquinterom:fix_NA

Conversation

@andyquinterom
Copy link
Contributor

@andyquinterom andyquinterom commented Jul 25, 2022

Resolves #564

R/utils.R Outdated
m <- offsets[n]
result[pts >= n] <- m
result[is.infinite(pts)] <- m
result[is.na(pts)] <- m
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we could just replace

result[is.infinite(pts)] <- m

with

result[!is.finite(pts)] <- m

and both Inf and NA cases are handled.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me

@andyquinterom
Copy link
Contributor Author

Fixed!

Copy link
Member

@renkun-ken renkun-ken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NA introduced into position when opening curly braces

3 participants

X Tutup