Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/gjamPoints2Grid.R
From point pattern data in (x, y) generates counts on a lattice supplied by the user or specified by lattice size or density. For analysis in gjam as counts (known effort) or count composition (unknown effort) data
.
1 2  gjamPoints2Grid(specs, xy, nxy = NULL, dxy = NULL,
predGrid = NULL, effortOnly = TRUE)

specs 

xy 

nxy 
length2 
dxy 
length2 
predGrid 

effortOnly 

For incidence data with species names specs
and locations (x, y)
constructs a lattice based a prediction grid predGrid
, at a density of (dx, dy)
, or with numbers of lattice points (nx, ny)
. If effortOnly = T
, returns only points with nonzero values.
A prediction grid predGrid
would be passed when counts by locations of known effort are required or where multiple groups should be assign to the same lattice points.
The returned gridBySpec
can be analyzed in gjam
with known effort as count data "DA"
or with unknown effort as count composition data "CC"
.




James S Clark, jimclark@duke.edu
Clark, J.S., D. Nemergut, B. Seyednasrollah, P. Turner, and S. Zhang. 2016. Generalized joint attribute modeling for biodiversity analysis: Medianzero, multivariate, multifarious data. Ecological Monographs 87, 3456.
gjam
A more detailed vignette is can be obtained with:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22  ## Not run:
## random data
n < 100
s < sample( letters[1:3], n, replace = TRUE)
xy < cbind( rnorm(n,0,.2), rnorm(n,10,2) )
nx < ny < 5 # uniform 5 X 5 lattice
f < gjamPoints2Grid(s, xy, nxy = c(nx, ny))
plot(f$predGrid[,1], f$predGrid[,2], cex=.1, xlim=c(1,1), ylim=c(0,20),
xlab = 'x', ylab = 'y')
text(f$predGrid[,1], f$predGrid[,2], rowSums(f$gridBySpec))
dx < .2 # uniform density
dy < 1.5
g < gjamPoints2Grid(s, xy, dxy = c(dx, dy))
text(g$predGrid[,1], g$predGrid[,2], rowSums(g$gridBySpec), col='brown')
p < cbind( runif(30, 1, 1), runif(30, 0, 20) ) # irregular lattice
h < gjamPoints2Grid(s, xy, predGrid = p)
text(h$predGrid[,1], h$predGrid[,2], rowSums(h$gridBySpec), col='blue')
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.