function in R Language is used to get the list of all the attached packages in the R search path.**search()**

Syntax:search()

Parameters:

This function takes no parameters.

**Example 1:**

`# R program to list the packages ` `# attached to R search path ` ` ` `# Calling search() function ` `search() ` |

*chevron_right*

*filter_none*

**Output:**

[1] ".GlobalEnv" "package:stats" "package:graphics" [4] "package:grDevices" "package:utils" "package:datasets" [7] "package:methods" "Autoloads" "package:base"

**Example 2:**

`# R program to list the packages ` `# attached to R search path ` ` ` `# Attaching datasets to path ` `attach(airquality) ` `attach(BOD) ` ` ` `# Calling search() function ` `search() ` |

*chevron_right*

*filter_none*

**Output:**

[1] ".GlobalEnv" "BOD" "airquality" [4] "package:stats" "package:graphics" "package:grDevices" [7] "package:utils" "package:datasets" "package:methods" [10] "Autoloads" "package:base"

## Recommended Posts:

- Get the Full Path of all the Attached Packages in R Programming - searchpath() Function
- Grid and Lattice Packages in R Programming
- Packages in R Programming
- What Are the Tidyverse Packages in R Language?
- 7 Best R Packages for Machine Learning
- Search and Return an Object with the specified name in R Programming - get() Function
- Get a List of all the 657 colors in R Programming - colors() Function
- Get the List of Arguments of a Function in R Programming - args() Function
- Get a List of Numbers in the Specified Range in R Programming - seq.int() Function
- Get a List of points obtained by Interpolation in R Programming - spline() and splinefun() Function
- Search the Interval for Minimum and Maximum of the Function in R Programming - optimize() Function
- Convert an Object to List in R Programming - as.list() Function
- Check if the Object is a List in R Programming - is.list() Function
- List all the Objects present in the Current Working Directory in R Programming - ls() Function
- Get Exclusive Elements between Two Objects in R Programming - setdiff() Function
- Get or Set Levels of a Factor in R Programming - levels() Function
- Get or Set Dimensions of a Matrix in R Programming - dim() Function
- Get Indices of Specified Values of an Array in R Programming - arrayInd() Function
- Get the number of columns of an Object in R Programming - ncol() Function
- Get the number of rows of an Object in R Programming - nrow() Function

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.