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 agronomic analyses.
use_template(
template_name = "mixed_model_template.R",
dest_dir = ".",
open = TRUE,
overwrite = FALSE,
output_name = NULL
)
template_name |
Name or path of the template file to use.
Default is |
dest_dir |
Directory where the template should be copied.
Default is the current working directory ( |
open |
Logical (default |
overwrite |
Logical (default |
output_name |
|
This function is designed to help users get started with biometryassist analyses by providing tested, documented templates. The templates include:
Suggested package loading
Commented code explaining steps
Example data exploration
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
## 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.