In R, We can easily find the variables that are currently available at a point in an R command prompt or R script file. We can use ls() function to do so. ls() function uses patterns to match the variable names.
Examples:
> print(ls())
Output:
[1] "a" "b" "factor_student" "list1" [5] "School" "students"