Description Usage Arguments See Also Examples
View source: R/SpatialPointsBreeding.R
Converts a data.frame
to a SpatialPointsBreeding
object. The SpatialPointsBreeding
class extends
SpatialPointsDataFrame
with three extra slots defining the
id (i.e. nest or breeding box) and the pair identity (i.e. male and female),
respectively.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | SpatialPointsBreeding(
data,
proj4string,
coords = ~x + y,
breeding = ~male + female,
id
)
## S4 method for signature 'SpatialPointsBreeding,missing'
plot(
x,
pch = 20,
axes = FALSE,
add = FALSE,
xlim = NULL,
ylim = NULL,
...,
cex = 1,
col = "grey",
lwd = 1,
bg = "grey90"
)
## S4 method for signature 'SpatialPointsBreeding,eppMatrix'
plot(
x,
y,
pch = 20,
axes = FALSE,
add = FALSE,
xlim = NULL,
ylim = NULL,
...,
cex = 1,
col = "grey",
col.epp = "red",
lwd = 1,
lty = 2,
bg = "grey90"
)
|
data |
a |
proj4string |
A |
coords |
Formula specifying which columns in object are the spatial
coordinates. Argument passed to |
breeding |
One side formula defining the male and female ID in that order (e.g. ~ male + female) |
id |
Integer specifying the location id (e.g. nest box number, den ID). |
x |
a |
pch |
see |
axes |
see |
add |
see |
xlim |
see |
ylim |
see |
... |
further arguments to pass to plot(as(x, "Spatial") |
cex |
see |
col |
see |
lwd |
see |
bg |
see |
y |
an |
col.epp |
extra-pair partners color |
lty |
see |
1 2 3 4 5 6 7 8 9 | d = data.frame(
x = c(4, 17, 16, 41, 41, 43, 86, 62, 71, 92, 95,53, 34, 27, 53),
y = c(3, 18, 36, 6, 18, 50, 3, 21, 40, 43, 57, 62, 62, 45, 37),
id = 1:15,male = paste0('m', 1:15), female = paste0('f', 1:15),
stringsAsFactors = FALSE)
b = SpatialPointsBreeding(d, id = 'id', breeding = ~ male+female)
plot(b)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.