Learn R Programming

surveydown (version 0.5.0)

sd_include_folder: Include a folder to the 'shiny' resource path

Description

This function includes a specified folder to the 'shiny' resource path, making it accessible for serving static files in a 'shiny' application. It checks for pre-existing resource paths to avoid conflicts with folders already included by the package.

Usage

sd_include_folder(folder)

Value

NULL invisibly. The function is called for its side effect of adding a resource path to 'shiny'.

Arguments

folder

A character string specifying the name of the folder to include. This folder should exist in the root directory of your 'shiny' app.

Examples

Run this code
if (interactive()) {
  library(shiny)

  # Create an "images" folder
  dir.create("images")

  # Include the folder in the shiny resource path
  sd_include_folder("images")
}

Run the code above in your browser using DataLab