List all the Objects present in the Current Working Directory in R Programming - ls() Function Last Updated : 17 Jun, 2020 Comments Improve Suggest changes Like Article Like Report ls() function in R Language is used to list the names of all the objects that are present in the working directory. Syntax: ls() Parameters: This function needs no argument Example 1: Python3 1== # R program to list all the object names # Creating a vector vec <- c(1, 2, 3) # Creating a matrix mat <- matrix(c(1:4), 2) # Creating an array arr <- array(c(1:4), 2) # Calling ls() Function ls() Output: [1] "arr" "mat" "vec" Example 2: Python3 1== # R program to list all the object names # Creating a list list1 = list("Numbers" = c(1:3), "Characters" = c(1:5)) # Creating a Data frame df = data.frame("Numbers" = c(1:3), "Characters" = c(4:6)) # Calling ls() Function ls() Output: [1] "df" "list1" Comment More infoAdvertise with us Next Article List all the Objects present in the Current Working Directory in R Programming - ls() Function N nidhi_biet Follow Improve Article Tags : R Language R List-Function Similar Reads Convert an Object to List in R Programming - as.list() Function as.list() function in R Programming Language is used to convert an object to a list. These objects can be Vectors, Matrices, Factors, and dataframes. Syntax: as.list(object) Parameters: object: Vector, Matrix, factor, or data frame R - as.list() Function ExampleExample 1: Converting Vector to list 2 min read Display the internal Structure of an Object in R Programming - str() Function str() function in R Language is used for compactly displaying the internal structure of a R object. It can display even the internal structure of large lists which are nested. It provides one liner output for the basic R objects letting the user know about the object and its constituents. It can be 3 min read Convert an Object into a Vector in R Programming - as.vector() Function as.vector() function in R Language is used to convert an object into a vector. Syntax: as.vector(x) Parameters: x: Object to be converted Example 1: Python3 1== # R program to convert an object to vector # Creating an array x <- array(c(2, 3, 4, 7, 2, 5), c(3, 2)) x # Calling as.vector() Function 1 min read Get a List of all the Attached Packages in R Programming - search() Function search() function in R Language is used to get the list of all the attached packages in the R search path. Syntax: search() Parameters: This function takes no parameters. Example 1: Python3 1== # R program to list the packages # attached to R search path # Calling search() function search() Output: 1 min read Get a List of all the 657 colors in R Programming - colors() Function colors() function in R Language is used to show all the 657 color names that are contained in R programming. Syntax: colors()Parameters: Does not accept any parameters.  Example 1:  Python3 # R program to illustrate # colors function # Calling the colors() function # to show all the 657 colors th 1 min read Like