Installing the gridio R package
July 20, 2015

Ethan Plunkett  eplunkett@eco.umass.edu

Requirements
1. Windows (as far as I know the flavor doesn't matter).
2. 32 bit R.  On 64 bit systems R will by default install both 32 bit and 64 bit R.  If you use RStudio you can configure it to use the 32 bit R under Tools -> Global Options -> General ->  R. Version (Change)  
3.  ArcView 3.3 or ArcMap 10. 

Installation

If using ArcView (more stable)
1. Make sure ArcView 3.3 is installed.
2. Add the following to your system path:  "C:\ESRI\AV_GIS30\ARCVIEW\BIN32\" if you have ArcGIS installed make sure to add the path above before the ArcMap path which will automatically have been added to your path.  

If using ArcMap (usually works but depending on the combination of OS, ArcMap version, and other unknown factors may not)
1. Make sure ArcMap 10 is Installed
2. The installer might update your system path automatically but you should check to make sure that it has added a path to the ArcGIS bin directory.  Here are some paths that have worked for people:
	10.0 :  "C:\arcgis\arcexe10x\bin"
	10.2 : "C:\Program Files (x86)\ArcGIS\Desktop10.2\bin"
	10.3 :  "C:\Program Files\ArcGIS\Desktop10.3\bin"
	(If you have a path for another version let me know what it is and I'll add it here). 

Look online if you need help changing the path variable eg: http://www.computerhope.com/issues/ch000549.htm

3. Open R and from the "Packages" menu select "Install package(s) from local zip files…" navigate to the grid zip file (it will include the current version in the file name) and select it.
4.  In R type library(gridio) to load the library. We've had problems with it hanging indefinitely at this step if the ArcGIS path precedes the ArcView path in your systems PATH environmental variable (See step 2). You will see a warning about the FPU control word; it's safe to ignore.  If you are using a version of R that doesn't match the system the package was built on you may also get a warning about that; these generally have been safe to ignore but there's no guarantee. 
5. If you are planning on using gridio with a gridserver you may have to open up ports on your firewall and you'll definitely have to launch the gridserver via the windows cmd shell.  Use cd to navigate to the directory holding grd_server.exe.  And then type grd_server.exe [port] [root folder] where [port] is the port number and [root folder] is the path to the root folder of the grid sever.  For example  grd-server 3333 W: would open the server on port 3333 with w: as the root directory.  

Use
The package uses r's standard manual system for help.  Typing ?gridinit  in R is a good place to start if your are planning on writing or reading grids. help(package=gridio) will give you a list of functions provided by the package.