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