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

Syntax:searchpath()

Parameters:

This function takes no parameters.

**Example 1:**

`# R program to get the full path ` `# of attached packages in R ` ` ` `# Calling searchpath() function ` `searchpath() ` |

*chevron_right*

*filter_none*

**Output:**

[1] ".GlobalEnv" [2] "C:/Program Files/R/R-2.15.2/library/stats" [3] "C:/Program Files/R/R-2.15.2/library/graphics" [4] "C:/Program Files/R/R-2.15.2/library/grDevices" [5] "C:/Program Files/R/R-2.15.2/library/utils" [6] "C:/Program Files/R/R-2.15.2/library/datasets" [7] "C:/Program Files/R/R-2.15.2/library/methods" [8] "Autoloads" [9] "C:/PROGRA~1/R/R-215~1.2/library/base"

**Example 2:**

`# R program to get the full path ` `# of attached packages in R ` ` ` `# Attaching datasets to path ` `attach(BOD) ` `attach(airquality) ` ` ` `# Calling searchpath() function ` `searchpath() ` |

*chevron_right*

*filter_none*

**Output:**

[1] ".GlobalEnv" [2] "BOD" [3] "airquality" [4] "C:/Program Files/R/R-2.15.2/library/stats" [5] "C:/Program Files/R/R-2.15.2/library/graphics" [6] "C:/Program Files/R/R-2.15.2/library/grDevices" [7] "C:/Program Files/R/R-2.15.2/library/utils" [8] "C:/Program Files/R/R-2.15.2/library/datasets" [9] "C:/Program Files/R/R-2.15.2/library/methods" [10] "Autoloads" [11] "C:/PROGRA~1/R/R-215~1.2/library/base"

## Recommended Posts:

- Get a List of all the Attached Packages in R Programming - search() Function
- Grid and Lattice Packages in R Programming
- Packages in R Programming
- What Are the Tidyverse Packages in R Language?
- 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 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
- Get Transpose of a Matrix or Data Frame in R Programming - t() Function
- Get the Maximum element of an Object in R Programming - max() Function
- Get the Minimum element of an Object in R Programming - min() Function
- Get Addition of the Objects passed as Arguments in R Programming - sum() Function
- Search and Return an Object with the specified name in R Programming - get() Function
- Get the Minimum and Maximum element of a Vector in R Programming - range() Function
- Get or Set names of Elements of an Object in R Programming - names() Function
- Get Date and Time in different Formats in R Programming - date(), Sys.Date(), Sys.time() and Sys.timezone() 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.