Gary King Homepage Previous: Installation Up: Installation Next: Linux/Unix

Windows

Begin the installation process by launching R. To install the package WHATIF as well as the package that it depends upon, lpSolve, type:

  > install.packages("WhatIf", dependencies = TRUE)
at the R command prompt. This command installs the packages from the CRAN respository set as part of your R options. You can see what its current value is by calling
  > getOption("repos")
The default, `factory fresh' setting will usually prompt you to select a CRAN mirror. One alternative for installing the package WHATIF is to use Gary King's website as the repository. You can do this by typing:
  > install.packages("WhatIf", repos = "http://gking.harvard.edu")
You will then need to install the package lpSolve from CRAN by typing:
  > install.packages("lpSolve")
A second alternative is to download the Windows bundle from http://GKing.Harvard.Edu/bin/windows/contrib and use the R pull-down menu commands for installing a package from a zip file. You again will then need to install lpSolve, which can be done either by typing the command given above at the command prompt or by using the pull-down menus. Finally, you then only need to type:
  > library("WhatIf")
from within R to load the WHATIF package, after which you may begin working with it.



Gary King 2010-08-12