Reputation: 991
This question builds on a previous solution where a method was requested to restrict R functions for use in an exam: Restrict R functions for an exam.
The accepted solution works very well. However, I have a follow-up question: How can I enable autocompletion (and help, e.g. via ?
), particularly concerning point 5 in the accepted answer?
The general workflow involves adding the required functions to a whitelist (e.g. .win32consoleCompletion
). However, this approach does not work directly, as additional functions must also be whitelisted, I assume. If too many functions are whitelisted, the restriction is weakened, allowing almost every command to be executed again. Unfortunately, I have been unable to find the correct commands to make autocompletion (and help via ?
) work under these constraints.
The .Rprofile from the linked answer is used, and R.exe is started through a batch file with the .Rprofile specified on the command line interface of Windows.
Please note that this must work on Windows because we are using the Safe Exam Browser, which is not compatible with GNU/Linux.
Upvotes: 1
Views: 86