vscode-R icon indicating copy to clipboard operation
vscode-R copied to clipboard

R Markdown: New Draft` does not work for some templates

Open jooyoungseo opened this issue 2 years ago • 3 comments

CC @renkun-ken

I've found that R Markdown: New Draft does not work for some templates.

Reprex

  1. install.packages("ghclass")
  2. Launch R Markdown: New Draft
  3. Type ghclass
  4. See if either "Reviewer feedback form, {ghclass}" or "Author rating form, {ghclass}" works: cannot make any draft out of them

jooyoungseo avatar Mar 13 '22 01:03 jooyoungseo

We use rmarkdown::draft(...) to create new drafts.

In this case, it looks like ghclass does not comply with rmarkdown template.

> rmarkdown::draft(file = "test-ghclass.Rmd", template = "review", package = "ghclass")                                          
Error in rmarkdown::draft(file = "test-ghclass.Rmd", template = "review",  : 
  template.yaml must contain name and description fields
Backtrace:
1: stop("template.yaml must contain name and description fields")
2: rmarkdown::draft(file = "test-ghclass.Rmd", template = "review",

renkun-ken avatar Mar 13 '22 16:03 renkun-ken

I tried adding a description field to template.yaml and it works.

In RStudio, looks like it does not rely on rmarkdown::draft() but directly uses skeleton/skeleton.Rmd instead.

renkun-ken avatar Mar 13 '22 16:03 renkun-ken

Aw, I see. Thank you so much for investigating this issue, @renkun-ken! I have seen that you opened an issue in the ghclass repo. Thank you very much!

jooyoungseo avatar Mar 13 '22 16:03 jooyoungseo

This issue is stale because it has been open for 365 days with no activity.

github-actions[bot] avatar Mar 14 '23 01:03 github-actions[bot]

unstale

renkun-ken avatar Mar 14 '23 06:03 renkun-ken

This issue is stale because it has been open for 365 days with no activity.

github-actions[bot] avatar Mar 14 '24 01:03 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Mar 28 '24 01:03 github-actions[bot]