library(lemon)
library(knitr)
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
.
The modeling functions discussed below require several input objects to work, which we will discuss here.
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))
library(raster)
ndvi_raster=stack("C:\\Users\\BGOCHANOUR\\Documents\\GitHub\\move-model\\Input_Data\\NDVI_2013.gri")
plot(ndvi_raster[[1:4]])