Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use template in wflowr_open #267

Open
ghost opened this issue Feb 16, 2022 · 1 comment
Open

Use template in wflowr_open #267

ghost opened this issue Feb 16, 2022 · 1 comment

Comments

@ghost
Copy link

ghost commented Feb 16, 2022

Hi,
Thank you for workflowr package.
I use it to help my colleagues to follow their 3 analysis type A, B and C. For each one we can change the input data file and add some plots. Each analysis follows a dedicated template integrate in our functions package.
So to do that I start a wflowr project, install and load our functions package and open several Rmd files using the 3 templates by file > new file > new R Markdown > from Template choosing our template. And We save each new files in analysis directory.
I would like to use wflow_open() with a parameter for the template to use. I think that it will be interesting to create a such parameter in wflow_open().

I see in this issue #83, developed in november 2017, that it corresponds to my need but I don't know how can I use it?

Thank you for your reply and help. Véronique

I use workflowr 1.7.0. with Rstudio 1.4.1106 on MacOS Monterey

@jdblischak
Copy link
Member

Hi @vjamilloux thanks for using workflowr and opening an Issue!

Have you tried using the function draft() from the rmarkdown package? I think it does what you need. You give it the name of the file to create, the name of the template, and the name of the package that contains the template. Then it opens the newly created file to edit.

rmarkdown::draft("analysis/file.Rmd", template = "A.rmd", package = "ourFunctionsPackage")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant