REditorSupport / REditorSupport/vscode-R

When evaluating a chunk in an RMD file, the params in the yaml metadata header should be evaluated first

Open
#1,673 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Is your feature request related to a problem? Please describe.

In RMD files, the yaml metadata header is ignored when evaluating chunks.

Describe the solution you'd like

The above problem can be circumvented by evaluating params <- rmarkdown::yaml_front_matter(\"$$\")$params (e.g., from a custom key mapping) beforehand. This is cumbersome though. It would be better, if the R extension would always do this before evaluating code chunks in an Rmd document.

Describe alternatives you've considered

Users can define a key map but this solution is cumbersome.

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 with the R extension's R Markdown chunk-evaluation path and the custom key-mapping workaround described in the issue. Check how rmarkdown::yaml_front_matter("$$") can provide the YAML params before a chunk runs. Done means params from the metadata header are evaluated automatically before chunk evaluation, without requiring a custom key map.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, typescript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.