R language-View load pack, dismount Load Pack and install package and unload package

Source: Internet
Author: User

In the R language, it is often necessary to see which package loads or looks at a number of similar functions, to see exactly which package is working, and to run the comparison analysis after loading and unloading.

1. View Loaded Packages

> (. Packages ())

Note that the outer brackets and the preceding points cannot be saved.

2. Remove the loaded Package

such as removing the Rmysql package

>detach ("Package:rmysql")

Note that it is dismounted, not unloaded, which means that the package is not completely removed from the R run environment, except that the package is not loaded for use.

It is useful to validate function dependencies when the package uses function conflicts.

3. Installation package

>install.packages ("Rjson")

Download the package to install the "Rjson" entry.

4. Unload Loaded Packages

To completely remove an installed package:

Remove. Packages (C ("Pkg1", "Pkg2"), lib = file. Path ("path", "to", "library"))

Report:

1. View Installed Packages

>installed.packages () [, C (' package ', ' Version ', ' LibPath ')]

where C (' package ', ' Version ', ' LibPath ') represents the display of packet name, version, library path information, and if none [, C (' ' Package ', ' Version ', ' LibPath ')] parameter, all information is displayed.

2. View the functions provided by a package

> Help (package= ' TSA ')

The packages parameter is the package name of the package that you want to view.

3. See which package a function belongs to

>help (name of function)

See which package belongs in the Open Web page.

R language-View load pack, dismount Load Pack and install package and unload package

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.