REditorSupport / REditorSupport/vscode-R

View() displays sets some numerical values to 0

Open
#1,463 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
1.2k
Forks
139
Avg merge
2h 46m
Merged PRs (30d)
5

Description

I noticed that View(dataframe) sometimes sets small numerical values (such as 2.5e-05) to 0. However, in the same dataframe, I also have values that are much smaller (1e-240) which get displayed correctly.

I have attached a screenshot of my observations. Here you can see that p column for the SNP "1_247598484_G_A" is displayed as 0.
view_bug

However, when I subset my data to only contain this value, you can see that the p value is actually different:
view_bug2

The str of the p column is num.

I have uploaded the dataset for which I observe this to wetransfer:
https://we.tl/t-3WxDaKx1Vn

I am using vscode-R version v2.8.2 and VScode v.1.85.1 on Windows11.

I appreciate any in that matter!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing View(dataframe) with the linked dataset, comparing the full dataframe with the subset containing the 2.5e-05 value. Trace the vscode-R View implementation and its numerical display or formatting path, then verify that small values in the full dataframe are displayed consistently with the subset.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, typescript, vscode
Domain
data, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.