我正在使用 learnr
开发教程包裹。在迭代测试过程中,我需要使教程文件失效。
我遵循了 Preserving Work 的解释,将 ID 和版本添加到 yaml header 。
但每当我更改 ID 和/或版本号时,我总是得到我最后一次练习。
When you change the ID or version of a tutorial all stored work associated with the tutorial is invalidated and users of the tutorial will start fresh when accessing it again. (from Preserving Work)
以上引用对我不起作用:即使我重新启动 RStudio 和/或使用 Clear Rendered Output …
分别Clear Knitr Cache …
.但我确实成功地更改了 block header 的标签,而且我知道我可以使用教程页面上的“重新开始”按钮。
难道是ID和version在本地不行? (顺便说一句:我的计算机上与教程相关的存储作品的文件在哪里?)
我的 yaml header 如下所示:
---
title: "Tutorial"
tutorial:
id: "b4e9e9b1-02b1-45c7-b35e-64ff6fbf0a0e"
version: 2.9
output:
learnr::tutorial:
progressive: true
allow_skip: true
runtime: shiny_prerendered
---
我正在使用 uuid
生成 ID 的包 - 如 learnr
中所述Tutorial Identifiers下的教程.
我总是使用命令 rmarkdown::run("<path-to-filename/filname>")
开始新的试验.
此问题应标记为 learnr
,但我没有创建新标签的权限。
最佳答案
@jjallaire 在 Github 上回答了我的问题:
Locally stored work doesn't use the ID unfortunately. Local tutorial storage can be found at:
file.path(rappdirs::user_data_dir(), "R", "learnr", "tutorial", "storage")
关于r - 学习者:如何通过更改 ID 和版本使本地存储的工作无效?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50783797/