Ensuring neccessary vignettes link to eachother properly#7726
Open
HunterB433 wants to merge 9 commits intoRdatatable:masterfrom
Open
Ensuring neccessary vignettes link to eachother properly#7726HunterB433 wants to merge 9 commits intoRdatatable:masterfrom
HunterB433 wants to merge 9 commits intoRdatatable:masterfrom
Conversation
Updated datatable-intro vignette
Change on joins vignette
aitap
reviewed
Apr 26, 2026
Member
aitap
left a comment
There was a problem hiding this comment.
Thank you for the investigation!
Here's the vignette link graph:
list.files(pattern = '[.]Rmd$') |> setNames(nm = _) |> lapply(\(x) {
x = readLines(x)
x = regmatches(x, gregexec('\\(([^/)]*[.]html)\\)', x))
x[lengths(x)>0] |> lapply(`[`, 2) |> unlist() |> unique()
})$`datatable-benchmarking.Rmd`
NULL
$`datatable-faq.Rmd`
NULL
$`datatable-fread-and-fwrite.Rmd`
NULL
$`datatable-importing.Rmd`
NULL
$`datatable-intro.Rmd`
[1] "datatable-keys-fast-subset.html" "datatable-reference-semantics.html"
$`datatable-joins.Rmd`
[1] "datatable-intro.html"
[2] "datatable-reference-semantics.html"
[3] "datatable-keys-fast-subset.html"
[4] "datatable-secondary-indices-and-auto-indexing.html"
$`datatable-keys-fast-subset.Rmd`
[1] "datatable-intro.html"
[2] "datatable-reference-semantics.html"
[3] "datatable-secondary-indices-and-auto-indexing.html"
$`datatable-programming.Rmd`
NULL
$`datatable-reference-semantics.Rmd`
[1] "datatable-intro.html" "datatable-sd-usage.html"
[3] "datatable-keys-fast-subset.html"
$`datatable-reshape.Rmd`
NULL
$`datatable-sd-usage.Rmd`
[1] "datatable-reference-semantics.html"
$`datatable-secondary-indices-and-auto-indexing.Rmd`
[1] "datatable-intro.html" "datatable-reference-semantics.html"
[3] "datatable-keys-fast-subset.html" "datatable-joins.html"
And the following vignettes are never linked to:
list.files(pattern = '[.]Rmd$') |> sub('[.]Rmd$', '.html', x = _) |> setdiff(unlist(graph))[1] "datatable-benchmarking.html" "datatable-faq.html"
[3] "datatable-fread-and-fwrite.html" "datatable-importing.html"
[5] "datatable-programming.html" "datatable-reshape.html"
Maybe they should be made part of the reading chain as well? @Rdatatable/committers I suggest the following order:
datatable-reshape.html
datatable-fread-and-fwrite.html
datatable-faq.html
datatable-importing.html
datatable-programming.html
datatable-benchmarking.html
FAQ at the end of the user topics, two vignettes for people who program with data.table, one vignette about the development process.
| flights[, names(.SD) := lapply(.SD, as.factor), .SDcols = is.character] | ||
| ``` | ||
| Let's clean up again and convert our newly-made factor columns back into character columns. This time we will make use of `.SDcols` accepting a function to decide which columns to include. In this case, `is.factor()` will return the columns which are factors. For more on the **S**ubset of the **D**ata, there is also an [SD Usage vignette](https://cran.r-project.org/package=data.table/vignettes/datatable-sd-usage.html). | ||
| Let's clean up again and convert our newly-made factor columns back into character columns. This time we will make use of `.SDcols` accepting a function to decide which columns to include. In this case, `is.factor()` will return the columns which are factors. For more on the **S**ubset of the **D**ata, there is also an [SD Usage vignette ('vignette("datatable-sd-usage", package="data.table")')](datatable-sd-usage.html). |
Member
There was a problem hiding this comment.
Suggested change
| Let's clean up again and convert our newly-made factor columns back into character columns. This time we will make use of `.SDcols` accepting a function to decide which columns to include. In this case, `is.factor()` will return the columns which are factors. For more on the **S**ubset of the **D**ata, there is also an [SD Usage vignette ('vignette("datatable-sd-usage", package="data.table")')](datatable-sd-usage.html). | |
| Let's clean up again and convert our newly-made factor columns back into character columns. This time we will make use of `.SDcols` accepting a function to decide which columns to include. In this case, `is.factor()` will return the columns which are factors. For more on the **S**ubset of the **D**ata, there is also an [SD Usage vignette (`vignette("datatable-sd-usage", package="data.table")`)](datatable-sd-usage.html). |
Use backticks `, not apostrophes ', to create a code block.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #5833
As discussed in the chain, there isn't a clear way to link ALL the vignettes, but we can at least check that the main ones are linked together.
Our team started by looking at what vignettes were linked together and found a clump of 6.
Seen in the diagram below, we wanted to map out how they all connected.
The connections were mostly satisfactory, but there were two things we felt could be improved on
To fix both of these issues, we followed the current linking format for each file, in each language. then checked the HTML files produced via litedown::fuse("filename.Rmd") for correctness.
Here is what they looked like for problem 1:



EN)
ES)
FR)
Here is what they looked like for problem 2:



EN)
ES)
FR)
We noticed that for problem 2, the R expression was also translated, but only in one instance, so we kept it for the instance it was already translated, and didn't translate for the instance it wasn't.
Overall, the changed diagram isn't that different, now just with an extra connection between "Joins" to "Secondary Indices"

We are unsure if this will trigger any tests, as its just vignettes, but whatever happens we will get it fully working before the final PR.
Thank you for your time