sandboxR (version 0.1)

sandbox.env: Sandboxed environment

Description

This function returns a special environment pre-loaded with bunch of forked functions from base, stats, graphics etc. to act as a jail for later evaluation.

Usage

sandbox.env(blacklist = as.character(unlist(commands.blacklist())))

Arguments

blacklist
character vector of function names which should be banned

Value

environment

Details

Some of the forked functions stops by default (to prevent using those inside the environment), for a full list see commands.blacklist. Other functions (found in package's namespace) behaves differently then usual: some parameters are forbidden (like eval's env) to prevent breaking out from the sandbox, some parameters and returned values are checked for "malicious" signs.