• Home
  • Recent Q&A
  • Java
  • Cloud
  • JavaScript
  • Python
  • SQL
  • PHP
  • HTML
  • C++
  • Data Science
  • DBMS
  • Devops
  • Hadoop
  • Machine Learning
in R Language by
Q:
Environment Scoping in R language

1 Answer

0 votes
by

In R, the environment is a collection of objects like functions, variables, data frame, etc.

R opens an environment each time Rstudio is prompted.

The top-level environment available is the global environment, called R_GlobalEnv. And we have the local environment.

We can list the content of the current environment.

ls(environment())

Output

## [1] "diff_ts"         "dt"              "speed"           "square_function"
## [5] "ts"              "x"               "x_vector"

Related questions

+2 votes
asked Jul 28, 2019 in R Language by Aarav2017
+2 votes
asked Jul 28, 2019 in R Language by Aarav2017
...