rstudio / rstudioapi

Safely access RStudio's API (when available)
http://rstudio.github.io/rstudioapi
Other
165 stars 35 forks source link

Feature Request: Add option to initialize project using a template #271

Open lpiep opened 1 year ago

lpiep commented 1 year ago

The "New Project Wizard" in RStudio offers the option to create projects using a template and to provide parameters to use in that template. It would be nice to have the same functionality in the rstudioapi package.

Using Rstudio's example template at https://github.com/rstudio/ptexamples, I might expect to initialize a new project using something like this:

params <- list(
  check = TRUE,
  select = "Field A",
  text = "here is some text",
  file = "/path/to/my/file"
)
rstudioapi::initializeProject(path = 'my_new_project', binding = 'hello_world', params = params)

Thanks!