Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
08181de
add vignette & link pkgdown
Gero1999 Jan 21, 2026
3fa8b91
build-ignore articles folder
Gero1999 Jan 21, 2026
19cb2fc
Add DT and rlang to DESCRIPTION dependencies
jimrothstein Jan 27, 2026
99db239
Add rlang and DT libraries to vignette preview-sdtm.Rmd
jimrothstein Jan 27, 2026
038a216
Add htmltools to DESCRIPTION dependencies
jimrothstein Jan 27, 2026
06de02a
use reactable instead of DT
Gero1999 Jan 28, 2026
22f693c
use specs yaml to separate datasets by therapeutic area
Gero1999 Jan 28, 2026
04da339
description: add yaml, rm rlang in suggests
Gero1999 Jan 28, 2026
66d30f0
change vignette title to "Preview of SDTM Datasets"
Gero1999 Jan 28, 2026
77c1b17
load pharmaversesdtm pkg in vignette chunk
Gero1999 Jan 28, 2026
7fa02c8
Sort therapeutic areas in preview-sdtm.Rmd
Gero1999 Jan 28, 2026
7587ba6
apply suggestion for text
Gero1999 Jan 29, 2026
ec97091
update vignettes/articles/preview-sdtm.Rmd
Gero1999 Jan 29, 2026
252e7d7
apply suggestions from manciniedoardo & specify collapsibles style
Gero1999 Jan 29, 2026
262f5d9
news: inform of new vignette in Documentation
Gero1999 Jan 29, 2026
f681b47
mv vignette tab to the left of news
Gero1999 Jan 29, 2026
f01e5b7
propercase therapeutic area names & add reference links in collapsible
Gero1999 Jan 29, 2026
b6a66d0
readme: include top msg to preview vignette
Gero1999 Jan 29, 2026
de0973e
apply Fanny-Gautier suggestions & bump pkg version
Gero1999 Jan 30, 2026
adaa0d6
fix warning vignette & improve table readability
Gero1999 Jan 30, 2026
bd691b1
add author description
Gero1999 Jan 30, 2026
6bc2cd1
man: fix workflow fail, roxygenise
Gero1999 Jan 31, 2026
59484bf
fix: aut spelling
Gero1999 Jan 31, 2026
7f0a5de
rm line in NEWS, mv aut in DESCRIPTION
Gero1999 Feb 3, 2026
e87c843
sort datasets alphabetically within each area
Gero1999 Feb 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@
^cran-comments\.md$
^.devcontainer$
^revdep
^vignettes/articles$
5 changes: 4 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,18 @@ Suggests:
cli,
covr,
devtools,
htmltools,
knitr,
lintr,
metatools,
pkgdown,
reactable,
rmarkdown,
roxygen2,
spelling,
testthat,
usethis
usethis,
yaml
Encoding: UTF-8
Language: en-US
LazyData: true
Expand Down
5 changes: 4 additions & 1 deletion _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@ authors:

navbar:
structure:
left: [reference, news]
left: [reference, news, preview]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest to move to the left of the changelog

components:
reference:
text: Reference
href: reference/index.html
preview:
text: Preview SDTM
href: articles/preview-sdtm.html

reference:
- title: "Generic Datasets"
Expand Down
60 changes: 60 additions & 0 deletions vignettes/articles/preview-sdtm.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
title: "Preview of SDTM Datasets"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest to rename to: "Explore SDTM Datasets" - similar in style to the admiral templates page. in general the more we can match the style of this page, the better.

date: "2026-01-17"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for the date here I think?

output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Preview of SDTM Datasets}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---


# Datasets Preview

Here is a preview of all datasets included in the `pharmaversesdtm` package. Organized by therapeutic area, each dataset is displayed in a collapsible panel with filtering options for easier exploration. For simplicity, only the first 50 rows of each dataset are shown.
Comment thread
Gero1999 marked this conversation as resolved.
Outdated

```{r echo=FALSE}
library(pharmaversesdtm)
library(htmltools)
library(reactable)
library(yaml)

specs_yml <- yaml::read_yaml(system.file("extdata/sdtms-specs.json", package = "pharmaversesdtm"))
Comment thread
Fanny-Gautier marked this conversation as resolved.
Outdated
specs_yml <- specs_yml$`sdtms-specs`

# Group datasets by therapeutic area
Comment thread
Fanny-Gautier marked this conversation as resolved.
areas <- sort(unique(sapply(specs_yml, function(x) x$therapeutic_area)))

collapsible_groups <- lapply(areas, function(area) {
# Indices of datasets in this area
area_indices <- which(sapply(specs_yml, function(x) x$therapeutic_area) == area)
# Create collapsibles for this area
area_panels <- lapply(area_indices, function(ix) {
dataset_name <- specs_yml[[ix]]$name
dataset_title <- specs_yml[[ix]]$label
# Ensure valid UTF-8 dataset content
dataset <- get(dataset_name, envir = asNamespace("pharmaversesdtm"))
if (is.data.frame(dataset)) {
for (col in names(dataset)) {
if (is.character(dataset[[col]])) {
dataset[[col]] <- iconv(dataset[[col]], to = "UTF-8", sub = "?")
}
}
}
tags$details(
tags$summary(paste0(dataset_name, ": ", dataset_title)),
reactable::reactable(
Comment thread
Fanny-Gautier marked this conversation as resolved.
Outdated
head(dataset, 50),
filterable = TRUE,
pagination = TRUE,
defaultPageSize = 5,
pageSizeOptions = c(5, 10, 25, 50),
showPageSizeOptions = TRUE
)
)
})
tagList(tags$h3(area), area_panels)
})

htmltools::browsable(tagList(collapsible_groups))
Comment thread
Fanny-Gautier marked this conversation as resolved.
Outdated
```