You can use ls() to list all variables that are created in the environment.
ls() can be used to fetch variables in different ways
Use ls() to display all variables.
- Using a character pattern
pat = " " is used for pattern matching such as ^, $, ., etc.
Hope it helps!