#install.packages(c('vmr')) library(vmr) vmrSetVerbose("Full")
Boxes are listed from https://app.vagrantup.com/VMR/.
Mainly you’ve got the OS, the R version installed (follow by a timestamp) and the provider available.
<- vmrList() list_boxes print(list_boxes)
To create a minimal vmr object you need the name and the provider of a box (default version is “latest”).
<- which(list_boxes$Name == "LinuxMint20-R") index <- vmrCreate(name = list_boxes$Name[index], provider = list_boxes$Provider) vmr_env vmr_env
Environment configuration depend of a directory (the working directory) and a file template call Vagrantfile.
This function have to be re-call if vmr_env object is modified.
When initializing environment the box with same name, version and provider, will be download once. It can be long depending of the box size and network bandwide. The box is save in vagrant environment (“~/.vagrant.d/”).
Note : when vmr environment is initialize, no more need to recreate vmr_env for further use (unless for specific case). Use vmrLoad() in that case to recreate the vmr object vmr_env.
To start an environment:
> This start the virtual environment using the vmr directory and the Vagrantfile template.
Be sure to always be in the same working directory.
Now enjoy using R console, the virtual environment GUI or both.
To get vmr Status:
To save the current state and stop the environment:
To resume an environment previously suspended:
To stop the environment (powerOff):