This function creates a survey template in a specified directory. It can use
different templates, with "simple"
being the default. The function prompts
the user to confirm the use of the current working directory if no path is
specified.
Usage
sd_create_survey(path = getwd(), template = "simple")
Arguments
- path
A character string specifying the directory in which to create
the survey template. Defaults to the current working directory.
- template
A character string specifying the survey template to use.
Defaults to "simple"
. Currently, only the "simple" template is available.
Value
Invisibly returns TRUE if the survey template was successfully created.
Details
This function downloads the latest version of the surveydown extension from GitHub,
and uses it to create a new survey project. It copies all necessary files and
directories to the specified path, excluding some files like README.md and .gitignore.
Examples
if (FALSE) { # \dontrun{
sd_create_survey()
sd_create_survey(path = "path/to/survey", template = "simple")
} # }