SCR23darray | R Documentation |
Convert SCR encounter data file (EDF) into a 3-d array useful for fitting models in BUGS/JAGS. The output array is 'nind' x 'ntraps' x 'noccassions'.
Note: this was modified on 10/27/2013 , the previous version incorrectly returned 'nind' x 'noccasions' x 'ntraps'
SCR23darray(edf, tdf)
edf |
Encounter data file (EDF) with assumed order of columns: session, individual, occasion, trap. All are integers. |
tdf |
Trap deployment file (TDF) |
This was modified on 10/27/2013 , the previous version incorrectly returned 'nind' x 'noccasions' x 'ntraps'
Returns a 3-d encounter array having dimensions 'nind' x 'ntraps' x 'noccasions' suitable for analysis in BUGS/JAGS.
Andy Royle, aroyle@usgs.gov
SCR book, Section 5.9
data(wolverine), wolvSCR0, array2secr
library("scrbook")
data(wolverine)
traps<-wolverine$wtraps
y3d <-SCR23darray(wolverine$wcaps,wolverine$wtraps)
# produce 'nind' x 'ntraps' 2-d matrix
y2d <- apply(y3d,c(1,2),sum)
toad<-wolvSCR0(y3d,traps,nb=1000,ni=2000,buffer=1,M=100,coord.scale=10000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.