library(lemon) 
library(knitr)

I. Getting Started

Installation

To use abmR, you must first install it from Github using devtools and load the library:

#devtools: install_github("bgoch5/move-model",subdir="abmr")
library(abmr,quietly=TRUE,warn.conflicts=FALSE)

While this package is still in development, it will be updated frequently, so please be sure to re-install frequently.

For abmR to work, you will need updated versions of the following packages: geosphere, ggplot2, raster, rgdal, rnaturalearth, rnaturalearthdata, sp, swfscMisc, table1.

Requirements for Environmental Data Rasters and Species objects

The modeling functions discussed below require several input objects to work, which we will discuss here.

  1. A shapefile that represents the boundaries for your movements.
library(rgdal) #For reading in shapefile
NOAM=readOGR(layer="NOAM",dsn=".")
#> OGR data source with driver: ESRI Shapefile 
#> Source: "C:\Users\BGOCHANOUR\Documents\GitHub\move-model\abmr", layer: "NOAM"
#> with 36 features
#> It has 18 fields
plot(NOAM,xlim=c(-130,-60),ylim=c(18,75))

  1. A environmental NDVI raster stack. We are currently working on how to attach an example raster to the package, but you can read yours in like this. Here, we plot just the first four layers.
library(raster)
ndvi_raster=stack("C:\\Users\\BGOCHANOUR\\Documents\\GitHub\\move-model\\Input_Data\\NDVI_2013.gri")
plot(ndvi_raster[[1:4]])