Skip to content

Commit 5860ad6

Browse files
committed
Add experimental badge to function that are
1 parent 1949146 commit 5860ad6

File tree

1 file changed

+3
-4
lines changed
  • docs/blog/posts/2025-xx-xx-R-package-release-1.5

1 file changed

+3
-4
lines changed

docs/blog/posts/2025-xx-xx-R-package-release-1.5/index.qmd

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ These helper functions wrap content in HTML spans with `data-qmd-base64` attribu
119119

120120
### Extract R Code from Quarto Documents
121121

122-
The new `qmd_to_r_script()` function provides an alternative to `knitr::purl()` that leverages `quarto inspect` for code extraction:
122+
The new `qmd_to_r_script()` <a href='https://lifecycle.r-lib.org/articles/stages.html#experimental'><img src='https://img.shields.io/badge/lifecycle-experimental-orange.svg' alt='Experimental lifecycle'></a> function provides an alternative to `knitr::purl()` that leverages `quarto inspect` for code extraction:
123123

124124
```r
125125
# Extract R code from a Quarto document
@@ -129,7 +129,7 @@ qmd_to_r_script("analysis.qmd") # Creates "analysis.R"
129129
qmd_to_r_script("analysis.qmd", script = "extracted-code.R")
130130
```
131131

132-
This function uses Quarto's static document analysis rather than R evaluation, making it faster and safer for simple code extraction. It preserves cells options as spin-style headers, commenting cells with `eval: false`, and ignoring content having `purl: false`. For documents using advanced knitr features like `child=` chunks or `knitr::read_chunk()`, `knitr::purl()` remains the recommended approach as it handles these through actual document processing.
132+
This function uses Quarto's static document analysis rather than R evaluation, making it faster and safer for simple code extraction. It preserves cells options, commenting cells with `eval: false`, and ignoring content having `purl: false`. For documents using advanced knitr features like `child=` chunks or `knitr::read_chunk()`, `knitr::purl()` remains the recommended approach as it handles these through actual document processing.
133133

134134
### Prepare R Scripts for Quarto Rendering
135135

@@ -170,8 +170,7 @@ data_file <- project_path("data", "analysis.csv")
170170
# Explicitly find the project root (searches for _quarto.yml)
171171
root <- find_project_root()
172172
```
173-
174-
`project_path()` intelligently handles different execution contexts:
173+
`project_path()` <a href='https://lifecycle.r-lib.org/articles/stages.html#experimental'><img src='https://img.shields.io/badge/lifecycle-experimental-orange.svg' alt='Experimental lifecycle'></a> intelligently handles different execution contexts:
175174
- During `quarto render`, it uses `QUARTO_PROJECT_ROOT` or `QUARTO_PROJECT_DIR` environment variables
176175
- In interactive sessions, it automatically detects the project root by searching for `_quarto.yml`.
177176
- Falls back to the current working directory with a warning if no project is found.

0 commit comments

Comments
 (0)