Search notes:

R function: ls

ls shows the variables and functions that are defined in a workspace (or environment(?)).
Variables whose names start with a dot are not returned by default. Setting all.names to TRUE changes this behavior.
#
#   See also  -> objects(), search()
#
var_1 <- 42
var_2 <- sqrt(var_1)
var_3 <- var_2 * var_2
.hidden <- "Not shown by ls"

ls()
# [1] "var_1" "var_2" "var_3"

ls(all.names = TRUE)
# [1] ".hidden" "var_1"   "var_2"   "var_3"

.hidden
# [1] "Not shown by ls"


ls('package:base')
#
#  Compare with apropos()
#
Github repository about-r, path: /functions/ls.R
The functions ls and objects are identical.

See also

development/languages/R/functions/ls.str
Index to (some) R functions

Index