Skip to content

Fix bug when formatting dates containing NAs for the data explorer #421

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

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

dfalbel
Copy link
Contributor

@dfalbel dfalbel commented Jun 29, 2024

Addresses posit-dev/positron#3734

The issue was that converting from RObject to Vec<String> does not allow for the character vector to contain NAs and unexpectedly format()might return character vectors containing NA's, instead of formatting them with eg"NA"`.

This happens for POSIXct objects, for example:

> format(as.POSIXct(c(NA)))
NA

We still want to go over is.na(object) because factors will format NAs with "NA" and we won't be able to differentiate from a level called "NA", if it ever happens.

@dfalbel dfalbel requested a review from lionel- June 30, 2024 15:40
@dfalbel dfalbel merged commit 43118ed into main Jul 2, 2024
2 checks passed
@dfalbel dfalbel deleted the bugfix/format-date-na branch July 2, 2024 13:16
@github-actions github-actions bot locked and limited conversation to collaborators Jul 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants