Debian Codegraph @

man/autoload.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/autoload.R
3 \name{autoload}
4 \alias{autoload}
5 \title{Auto-load the active project}
6 \usage{
7 autoload()
8 }
9 \description{
10 Automatically load the renv project associated with a particular directory.
11 renv will search parent directories for the renv project root; if found,
12 that project will be loaded via \code{\link[=load]{load()}}.
13 }
14 \details{
15 To enable the renv auto-loader, you can place:
16
17 \if{html}{\out{<div class="sourceCode">}}\preformatted{renv::autoload()
18 }\if{html}{\out{</div>}}
19
20 into your site-wide or user \code{.Rprofile} to ensure that renv projects are
21 automatically loaded for any newly-launched \R sessions, even if those \R
22 sessions are launched within the sub-directory of an renv project.
23
24 If you'd like to launch \R within the sub-directory of an renv project
25 without auto-loading renv, you can set the environment variable:
26
27 \if{html}{\out{<div class="sourceCode">}}\preformatted{RENV_AUTOLOAD_ENABLED = FALSE
28 }\if{html}{\out{</div>}}
29
30 before starting \R.
31
32 Note that \code{renv::autoload()} is only compatible with projects using
33 \verb{renv 0.15.3} or newer, as it relies on features within the \code{renv/activate.R}
34 script that are only generated with newer versions of renv.
35 }