Installing R’s “mvtnorm” package in Windows system: solving the problem of the R package “mvtnorm” is not installed

When R language library is installed, some packages will be brought with it, which can be called directly. However, not all expansion packages come with them. Some packages need to be installed separately. For example, “mvtnorm” needs to be downloaded and installed manually
the following two methods have been tried, but the second one is easier to use. For the official documentation of mvtnorm, see the link: mvtnorm

1. Use the command to install

Open the command line interface (executable program exe) under the path of R, and several interfaces can be used, such as r.exe and rgui.exe. It is recommended to use rgui.exe because it has GUI interface, which is more convenient to operate
then enter the following command:


Choose the image source of cran, it’s better to choose the domestic one, so that the download speed is not too slow
select package – “install package –” and then select the package you want to install in the pop-up box. Note that package names are case sensitive. The reason why I choose this installation method is that I don’t need to search for the matching expansion package on the image URL. It’s easier than the first command line installation

after the installation, the prompt of package: mvtnorm “successfully unpacked and MD5 sums checked” will appear, and the installation path of binary package will be displayed
to check whether the installation is successful, you can enter the

from rpy2.robjects.packages import importr

You can check whether the installation is successful. If there is no display, the mvtnorm package is successfully installed. If: the R package “mvtnorm” is not installed.

3. References

R realization method of multivariate normal distribution test

Read More: