You are on page 1of 7

Installing FEAR on Windows, Linux, and

Mac Systems
Paul W. Wilson
Department of Economics and School of Computing
Clemson University
Clemson, South Carolina 296341309, USA

email: pww@clemson.edu
www: http:/www.clemson.edu/economics/faculty/wilson/
July 2013

Installing on Windows Systems

Download the archived, compressed package file (FEAR.zip) for Microsoft Windows systems
from
http://www.clemson.edu/economics/faculty/wilson/Software/FEAR/fear.html.
The same file can be used to install either 32-bit, 64-bit, or both versions of FEAR. FEAR
can be installed either for system-wide use by different users, or as a private copy for an
individual user.

1.1

Installing FEAR for System-Wide Use

This approach requires Administrator privileges. To install FEAR for system-wide use on
Windows systems, right-click on the R icon and select Run as Administrator to start the
R graphical user interface (GUI). At the top of the GUI window, click on Packages and
select Install package(s) from local zip files.... In the window that opens, navigate to and
select the FEAR.zip file that was downloaded previously. You should see the following in the
R Console window:
> utils::menuInstallLocal()
>
Next, in the R Console window, type require(FEAR). Since this is a new installation,
you should see something similar to the following:
> require(FEAR)
Loading required package: FEAR
FEAR (Frontier Efficiency Analysis with R) version 2.0 installed
Copyright Paul W. Wilson 2013
Type "fear.license()" to view the software license for FEAR
Type "fear.cite()" to view the proper citation for FEAR
license.dat not found in C:/Program Files/R/R-3.0.1/library/FEAR
***File "license.dat" not found.
Apparently this is a new installation of FEAR.
To obtain a license for FEAR, copy and paste
the following nine lines to a file and see
the instructions on the FEAR web site for
obtaining a valid "license.dat" file.
LICENSE KEY:
---FEAR-license-key--0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
---FEAR-license-key--Read 28 items
Error : .onAttach failed in attachNamespace() for FEAR, details:
1

call: detach("package:FEAR")
error: invalid name argument
>
FEAR has generated a unique key consisting of the eight lines of alpha-numeric characters
between the two lines ---FEAR-license-key--- (you will not see all zeros as depicted here).
Read the LICENSE file; if you installed the package in the default location C:
Program Files
R
R-3.0.1
library, then look at C:
Program Files
R
R-3.0.1
library
FEAR
LICENSE. Copy the ten lines starting and ending with ---FEAR-license-key--- into your
mailerdo not break the linesand email to pww@clemson.edu to request a license to run
FEAR. In your email, include your name, physical address, email address, and state whether
you will use FEAR for academic or non-academic use as described in the LICENSE.
I will send you a file, license.dat (after payment of the license fee as described in
LICENSE if you are a non-academic user). Assuming you installed FEAR in the default
location, copy this file to C:
Program Files
R
R-3.0.1
library
FEAR.
Restart R and then type require(FEAR). You should see something similar to this:
> require(FEAR)
Loading required package: FEAR
FEAR (Frontier Efficiency Analysis with R) version 2.0 installed
Copyright Paul W. Wilson 2013
Type "fear.license()" to view the software license for FEAR
Type "fear.cite()" to view the proper citation for FEAR
Read 2 items
>

1.2

Installing FEAR for a Single User

If you do not have Administrator privileges, or if you do not want others to use FEAR, you
should install using this approach. If you do not already have a directory (or folder) to
hold R packages that you have installed, create one (e.g., C:
MY R LIBS). You will need to set an environment variable to point to this directory; click
on Start, then Control Panel, System and Security, and finally System. Then
click on Advanced system settings in the System window that opens, and click on
Environment Variables in the new window that opens. Create a new environment variable
named R LIBS USER and assign to it the name of the directory where you want to keep your
R packages (e.g., C:
MY R LIBS).
2

Next, Click on the R icon to start the R GUI. At the top of the GUI window, click on
Packages and then select Install package(s) from local zip files.... In the window that
opens, navigate to and select the FEAR.zip file that was downloaded previously. A new
window, labeled Question, should open inside the R GUI, asking Would you like to use
a personal library instead? Select Yes. If you have used the naming scheme given above,
R will install FEAR to C:
MY R LIBS. You should see the following in the R Console window:
> utils::menuInstallLocal()
>
Now type require(FEAR) in the R Console window to generate a key as described above.
Follow the directions above to obtain a license file (license.dat), and install the license file
in to C:
MY R LIBS
FEAR (assuming you have used the naming scheme used here).
Restart R and then type require(FEAR). You should see something similar to this:
> require(FEAR)
Loading required package: FEAR
FEAR (Frontier Efficiency Analysis with R) version 2.0 installed
Copyright Paul W. Wilson 2013
Type "fear.license()" to view the software license for FEAR
Type "fear.cite()" to view the proper citation for FEAR
Read 2 items
>

Installing on Linux Systems

Installing FEAR on Linux systems is straight-forward. FEAR can either be installed by a


system administrator (i.e., by root) for system-wide use, or by an individual user for his own
use. In either case, download the archived, compressed package file (FEAR.tgz) for Linux
systems from
http://www.clemson.edu/economics/faculty/wilson/Software/FEAR/fear.html.

2.1

Installation by System Administrator

The default location for R is /usr/local/lib64; assuming this is the location where R was
installed on your system, cd to the directory containing FEAR.tgz and do the following:
/bin/su
cp FEAR.tgz /usr/local/lib64/R/library
cd /usr/local/lib64/R/library
tar xzf FEAR.tgz
rm FEAR.tgz
exit
Next, start R and attempt to load the FEAR package by typing require(FEAR). Since
this is a new installation, you should see something similar to the following:
3

> require(FEAR)
Loading required package: FEAR
FEAR (Frontier Efficiency Analysis with R) version 2.0 installed
Copyright Paul W. Wilson 2013
Type "fear.license()" to view the software license for FEAR
Type "fear.cite()" to view the proper citation for FEAR
license.dat not found in /usr/local/lib64/R/library/FEAR
***File "license.dat" not found.
Apparently this is a new installation of FEAR.
To obtain a license for FEAR, copy and paste
the following nine lines to a file and see
the instructions on the FEAR web site for
obtaining a valid "license.dat" file.
LICENSE KEY:
---FEAR-license-key--0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
---FEAR-license-key--Read 28 items
Error : .onAttach failed in attachNamespace() for FEAR, details:
call: detach("package:FEAR")
error: invalid name argument
>
FEAR has generated a unique key consisting of the eight lines of alpha-numeric characters between the two lines ---FEAR-license-key--- (you will not see all zeros as depicted here). Read the LICENSE file; if you installed the package in the default location
/usr/local/lib64/R/library, then look at /usr/local/lib64/R/library/FEAR/LICENSE.
Copy the ten lines starting and ending with ---FEAR-license-key--- into your mailerdo
not break the linesand email to pww@clemson.edu to request a license to run FEAR. In
your email, include your name, physical address, email address, and state whether you will
use FEAR for academic or non-academic use as described in the LICENSE.
I will send you a file, license.dat (after payment of the license fee as described in
LICENSE if you are a non-academic user). Assuming you installed FEAR in the default
location, copy this file to /usr/local/lib64/R/library/FEAR/. Then do the following:
/bin/su
cd /usr/local/lib64/R/library/FEAR
chmod 644 license.dat
exit
Restart R and then type require(FEAR). You should see something similar to this:
> require(FEAR)
Loading required package: FEAR
FEAR (Frontier Efficiency Analysis with R) version 2.0 installed
Copyright Paul W. Wilson 2013
4

Type "fear.license()" to view the software license for FEAR


Type "fear.cite()" to view the proper citation for FEAR
Read 2 items
>

2.2

Installation by User

From your home directory, make a directory to hold your R libraries and then install the
FEAR package. To illustrate, you might do this after downloading FEAR.tgz to your home
directory:
cd
mkdir foodir
R CMD INSTALL -l ~/foodir ~/FEAR.tgz
Next, start R and attempt to load the FEAR package by typing
require(FEAR,lib.loc="path\_to\_your\_home\_dir/foodir")
while replacing path to your home dir with the path to your home directory. This will
generate a license key as described above; follow the directions given in the previous section to obtain a license file. When you receive the license file (license.dat), copy it to
/foodir/FEAR/license.dat, restart R, and then type
require(FEAR,lib.loc="path\_to\_your\_home\_dir/foodir")
to load the FEAR package.

Installing on Mac OS X Systems

Installing FEAR on on Mac OS X systems is similar to installation on Linux systems. Download the archived, compressed package file (FEAR.tar.gz) for Linux systems from
http://www.clemson.edu/economics/faculty/wilson/Software/FEAR/fear.html.
The default location for R on Mac OS X systems is
{/Library/Frameworks/R.framework/Versions/Current/Resources}.
Assuming this is where R Is installed on your system, copy the package file FEAR.tar.gz to
/Library/Frameworks/R.framework/Versions/Current/Resources/library.
and then do the following:
cd /Library/Frameworks/R.framework/Versions/Current/Resources/library
tar xzf FEAR.tar.gz
Next, start R, type require(FEAR) to generate a key, and follow the directions given in
Section 2 to obtain a license file (license.dat). Copy the license file to
/Library/Frameworks/R.framework/Versions/Current/Resources/library/FEAR
and then type again require(FEAR) in R. You should see something similar to this:
5

> require(FEAR)
Loading required package: FEAR
FEAR (Frontier Efficiency Analysis with R) version 2.0 installed
Copyright Paul W. Wilson 2013
Type "fear.license()" to view the software license for FEAR
Type "fear.cite()" to view the proper citation for FEAR
Read 2 items
>

You might also like