use_template | R Documentation |
use_template()
copies a pre-built analysis template from the biometryassist
package to your working directory and optionally opens it for editing. These
templates provide standardized approaches for common biometric analyses.
use_template(
template_name = "mixed_model_template.R",
dest_dir = ".",
open = TRUE,
overwrite = FALSE,
output_name = NULL
)
template_name |
|
dest_dir |
|
open |
|
overwrite |
|
output_name |
|
This function is designed to help users get started with biometryassist analyses by providing tested, documented templates. The templates include:
Commented code explaining each step
Suggested package loading
Example data structures
Common analysis workflows
If a file with the same name already exists in the destination directory,
the function will not overwrite it unless overwrite = TRUE
is specified.
In this case, it will still open the existing file if open = TRUE
.
The file path to the copied template (invisibly). Called primarily for its side effects of copying and optionally opening the template file.
list_templates()
to see available templates
vignette("analysis-workflow", package = "biometryassist")
for analysis guidance
## Not run:
# Copy and open the default analysis template
use_template()
# Copy a specific template without opening
use_template("anova_template.R", open = FALSE)
# Copy to a specific directory
use_template("mixed_model_template.R", dest_dir = "analyses")
# Overwrite an existing file
use_template("mixed_model_template.R", overwrite = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.