In the code below, LETTERS and letters are global, or in the global search path and reachable through another package (same thing!)
> LETTERS [1] "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S" [20] "T" "U" "V" "W" "X" "Y" "Z" > letters [1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" [20] "t" "u" "v" "w" "x" "y" "z" > ls() character(0) > a <- "1 2 3" > ls() [1] "a" > rm(a) > ls() character(0) >
For the same reason it doesn’t list all the exported functions in all the attached packages (from
?ls):Specify the environment that contains
LETTERSandlswill print it’s name.