posit-dev / positron

Positron, a next-generation data science IDE
Other
2.48k stars 77 forks source link

Date showing as "????" in View pane #3734

Closed alearrigo closed 2 months ago

alearrigo commented 3 months ago

Positron Version:

Positron Version: 2024.06.1 (Universal) build 27 Code - OSS Version: 1.90.0 Commit: a893e5b282612ccb2200102957ac38d3c14e5196 Date: 2024-06-26T02:08:06.673Z Electron: 29.4.0 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Darwin arm64 23.5.0

Steps to reproduce the issue:

When a date variable is created, it appears as "????" in View. This applies only if an NA is present.

Example:

data <- tibble(var1 = c("2022-01-01","2022-02-01" , "2022-03-01",NA, "2022-04-01")) |> 
  mutate(var2 = as_date(var1))

View(data)
Screenshot 2024-06-29 alle 12 16 20
str(data)

tibble [5 × 2] (S3: tbl_df/tbl/data.frame)
 $ var1: chr [1:5] "2022-01-01" "2022-02-01" "2022-03-01" NA ...
 $ var2: Date[1:5], format: "2022-01-01" "2022-02-01" "2022-03-01" NA ...
data2 <- tibble(var1 = c("2022-01-01","2022-02-01" , "2022-03-01","2022-04-01")) |> 
  mutate(var2 = as_date(var1))
Screenshot 2024-06-29 alle 12 12 12

What did you expect to happen?

Correctly showing values as dates or NA.

Were there any error messages in the output or Developer Tools console?

No

petetronic commented 3 months ago

Thanks for reporting this issue, I can reproduce it using dplyr and lubridate:

install.packages("dplyr")
install.packages("lubridate")
library(dplyr)
library(lubridate)

data <- tibble(var1 = c("2022-01-01","2022-02-01" , "2022-03-01", NA, "2022-04-01")) |> 
  mutate(var2 = as_date(var1))

View(data)
jthomasmock commented 3 months ago

Thanks! Moving this into one of our milestones given @dfalbel has already picked it up.

testlabauto commented 2 months ago

Verified Fixed

Positron Version(s) : 2024.06.1-54
OS Version          : OS X

Test scenario(s)

Verified with lines of code from original filing.

Link(s) to TestRail test cases run or created: