October 2020
Beginner to intermediate
928 pages
23h 32m
English
Environments can be thought of as a set of existing or declared objects (functions, variables, etc.). When we start R, it will create an environment before the command prompt is available to the user.
The top-level environment is the R command prompt. This is the “global environment” and known as
R_GlobalEnv and can be accessed as
.GlobalEnv.
As mentioned earlier, the function
ls() shows which variables and functions are defined in the current environment. The function
environment() will tell us which environment is the current one.
When a function starts to be executed this will create a new environment that is subordonated to the environment that calls the function.
Read now
Unlock full access