Variables and Objects

# Defining two variables
a <- 1
b <- 2
# Entering the name leads to printing the content of the variable
a
[1] 1
# Showing the variables defined:
ls()
[1] "a" "b"
# Removing variables:
rm(a,b)
# Checking the existence of a variable
exists("a")
[1] FALSE
# "Hidden" variables
a <- 1
b <- 2
x <- 3
y <- 4
z <- 42
.zzyx <- 1412
ls()
[1] "a" "b" "x" "y" "z"
rm(list=ls())
ls()
character(0)
ls(all=TRUE)
[1] ".pbd_env" ".zzyx"