vscode-R icon indicating copy to clipboard operation
vscode-R copied to clipboard

Inconsistent display of NA values in view(...)

Open amsterdarm opened this issue 1 year ago • 1 comments

Describe the bug The rendering of NA values is inconsistent using view(df). Assume you have a data frame that contains NA values, as revealed by entering "df" into the terminal, inspecting cells using df[x,y], viewing the dataframe in RStudio using "view(df)". However, using "view(df)" in VS Code (Insiders), or opening the df from the workspace renders these NAs inconsistently. For example, NAs in one variable are displayed as NA, but displayed as an empty cell in another variable, while both are of the same class and type.

To Reproduce Unfortunately, I have not been able to reproduce this issue consistently.

Can you fix this issue by yourself? (We appreciate the help) Unfortunately, No.

Screenshots DeliveryStart and DeliveryEnd are class POSIXCt, type double. DateOfDelivery are class Date, type double.

grafik in vscode -> inconsistent

grafik in RStudio -> consistent

Environment:

  • OS: Win11
  • VSCode Version: 1.85.0-insider
  • R Version: 4.3.2
  • vscode-R version: 2.8.2

amsterdarm avatar Dec 13 '23 16:12 amsterdarm

I have the same issue, and I have tried other methods:

  1. View() by XQuartz,
  2. DT::datatable(),
  3. tkWidgets::dataViewer() (it crashed),
  4. DataEditR::data_edit().

Except 3 (it crashed), all other methods treated NAs display as empty cells. I speculate the display of NAs needs specific optimize.

lict99 avatar May 07 '24 04:05 lict99