Ken Butler has moved
banner
nxskok.mastodon.cloud.ap.brid.gy
Ken Butler has moved
@nxskok.mastodon.cloud.ap.brid.gy
now at @nxskok

🌉 bridged from https://mastodon.cloud/@nxskok on the fediverse by https://fed.brid.gy/
@sundogplanets *now* it makes sense!
August 13, 2025 at 3:15 AM
@sundogplanets you do, and I don't think I have ever seen (*) such a linear heard of goats.

(*) I should point out that assessing the linearity of a herd of goats is something I've only done once before, the last time you posted a suspiciously linear herd of goats.
August 13, 2025 at 2:26 AM
tarpar
tarpar
worktree.ca
August 12, 2025 at 7:56 PM
and here's the output with the "solution":
August 12, 2025 at 7:45 PM
Here's the "question only" output:
August 12, 2025 at 7:43 PM
Quarto is then run for each value of the parameter with output stored in the corresponding places.
August 12, 2025 at 7:41 PM
`tar_quarto_rep` takes four inputs:

- a target name
- the (template) quarto doc that is going to be rendered
- instructions for how to render it: the possible values for the parameter and what to call the corresponding output file
- any extra files to be monitored for changes (the file I […]
Original post on mastodon.cloud
mastodon.cloud
August 12, 2025 at 7:41 PM
Here's the business end of my _targets.R:

```
tar_option_set(
packages = c("tibble") # Packages that your targets need for their tasks.
)

list(
tar_quarto_rep(
report,
"reportage.qmd",
execute_params = tribble(
~hide_answers, ~output_file,
TRUE, "rminus.html",
FALSE, "rplus.html"
) […]
Original post on mastodon.cloud
mastodon.cloud
August 12, 2025 at 7:36 PM
So how do I use targets to render reportage.qmd *twice*, once with `hide_answers` being true and once with it being false? This is where `tar_quarto_rep` comes in, from `tarchetypes`. This is a "target factory": it does some work behind the scenes to create targets that are then run to produce […]
Original post on mastodon.cloud
mastodon.cloud
August 12, 2025 at 7:34 PM
I have a template document that includes this one, and *that* has the right parameter in its yaml header, and passes it on to included documents:

```
---
title: "Reportage"
format: html
params:
hide_answers: false
---

{{< include inclusief.qmd >}}
```

This one is called reportage.qmd.
August 12, 2025 at 7:31 PM
The `r if (params$hide_answers)` thing begins and ends a div block for which the content is either hidden or not, depending on the value of the `hide_answers` parameter. But this file has no yaml header (it is designed to be included in another file). So where does it get the parameter value from?
August 12, 2025 at 7:28 PM
@nrennie I like to start with each assignment question in a separate file. Here is one called `inclusief.qmd` (don't ask me why I gave it a Dutch name):

```
This is some text, that might be an assignment question.

`r if (params$hide_answers) "::: {.content-hidden}"`

This might be an answer […]
Original post on mastodon.cloud
mastodon.cloud
August 12, 2025 at 7:25 PM
@sundogplanets I hope you got the peaceful vibes you seemed to be needing.
August 12, 2025 at 5:13 AM
@jamesravey urp. I guess I *do* need to figure out Codeberg Pages.
August 12, 2025 at 5:11 AM
@miffyhelen not that this will help any, but: when my daughter was about 2 years old, she got irrationally angry right after lunch (and at nap time). I couldn't figure out what to do, so I let her yell. After a few minutes, it went very quiet. She was fast asleep.
August 10, 2025 at 2:21 AM