mirror of
https://github.com/rstudio/shiny.git
synced 2026-02-09 22:25:59 -05:00
37 lines
1.4 KiB
R
37 lines
1.4 KiB
R
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/app.R
|
|
\name{loadSupport}
|
|
\alias{loadSupport}
|
|
\title{Load an app's supporting R files}
|
|
\usage{
|
|
loadSupport(appDir, renv = new.env(parent = globalenv()),
|
|
globalrenv = globalenv())
|
|
}
|
|
\arguments{
|
|
\item{appDir}{The application directory}
|
|
|
|
\item{renv}{The environmeny in which the files in the \code{R/} directory should
|
|
be evaluated.}
|
|
|
|
\item{globalrenv}{The environment in which \code{global.R} should be evaluated. If
|
|
\code{NULL}, \code{global.R} will not be evaluated at all.}
|
|
}
|
|
\description{
|
|
Loads all of the supporting R files of a Shiny application. Specifically,
|
|
this function loads any top-level supporting \code{.R} files in the \code{R/} directory
|
|
adjacent to the \code{app.R}/\code{server.R}/\code{ui.R} files.
|
|
}
|
|
\details{
|
|
Since Shiny 1.5.0, this function is called by default when running an
|
|
application. If it causes problems, you can opt out by using
|
|
\code{options(shiny.autoload.r=FALSE)}. Note that in a future version of Shiny,
|
|
this option will no longer be available. If you set this option, it will
|
|
affect any application that runs later in the same R session, potentially
|
|
breaking it, so after running your application, you should unset option with
|
|
\code{options(shiny.autoload.r=NULL)}
|
|
|
|
The files are sourced in alphabetical order (as determined by
|
|
\link{list.files}). \code{global.R} is evaluated before the supporting R files in the
|
|
\code{R/} directory.
|
|
}
|