wflow_open
is a convenience function to make it easier to begin
working, especially when starting a new analysis. First, it creates a new
file if necessary and tries to make educated guesses about metadata like the
title, author, and date. Second, it sets the working directory to the knit
directory. The knit directory is where the code in the R Markdown files is
executed, and may be defined via the field knit_root_dir
in the file
_workflowr.yml
(see wflow_html
for all the details). If
this field is not defined, then the knit directory is the R Markdown
directory. Third, it opens the file(s) in RStudio if applicable. The latter
two side effects can be turned off if desired.
If you would like to create an R Markdown file with wflow_open
for an
analysis that is not part of a workflowr project, set project = NULL
.
Otherwise wflow_open
will throw an error. Note that the working
directory is not changed when project = NULL
.