Skip to contents

Create a new RStudio project then launch this addin. You will be able to create folders and scripts to start your analysis/project/application in no time.

Usage

initProject()

Value

the return of runGadget

Details

You can change some default parameters if you want, look at example below, here's the full list of parameters :

  • author: The value to use by default for author input, used when creating a script from template.

  • folders.default: The names of the directories to create.

  • folders.selected: Select folders to create by default.

  • packages.default: A vector of packages to load in scripts, by default all packages installed.

  • packages.selected: Select packages to load by default.

  • config: Add a config script or not at the root of the projects for loading data, sourcing funs, ...

  • source_funs: Add code to source functions.

  • create_template: Make Shiny template selection appear.

  • template: Template to create, `shiny` for a classic shiny app (ui, server, global), `dashboard` for use shinydashboard, `miniapp` for a single file app (app.R)

Examples

if (FALSE) {
# you can launch the addin via the RStudio Addins menu
# or in the console :
addinit::initProject()

# Change default parameters
# (you can put this in your Rprofile) :
my_custom_params <- list(
  author = "Your Name",
  project = list(
    folders = list(
      default = c("R", "inst", "man", "data-raw", "data", "tests"),
      selected = c("R", "man")
    ),
    packages = list(
      default = rownames(installed.packages()),
      selected = "shiny"
    )
  )
)
options("addinit" = my_custom_params)

# Then relaunch the addin
}