Learn R Programming

TexExamRandomizer (version 1.2.7)

fun_from_folder: Apply function within a folder

Description

It executes the function fun by first switching directories temporarily to the folder folder and then returning to the working directory.

Usage

fun_from_folder(folder, fun, ...)

Value

The return value of fun(...)

Arguments

folder

The folder of execution that the function is switched to before executing fun

fun

Function to be executed from the relative path

...

Options to be passed to fun

Examples

Run this code
list.files()
fun_from_folder(system.file("data", package = "TexExamRandomizer"), list.files)
list.files()

Run the code above in your browser using DataLab