Description Usage Arguments Value Examples
This function allows for the analysis of multiple migration in a single movement time series.
1 | fitMultiMigration(data, span1, span2, plot)
|
data |
A processed daily averaged data frame, i.e. output of |
span1 |
A vector of *initial* times for analysis windows. Should be of length *k*, where *k* is the number of migrations to fit. |
span2 |
A vector of *final* times for analysis windows |
plot |
Whether or not to visualize the output with |
a data frame with the date, duration, estimated ranging areas of each of the migrations.
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 | ## Not run:
### Enter Login and Password information for Movebank
# login <- movebankLogin(username="xxxx", password="xxxx")
# Download data
ds <- getMovebankData(study="ABoVE: NPS Dall Sheep Lake Clark", login=login)
# Process data for use in above package
ds.mt <- processMovedata(ds, idcolumn = "individual_id", projTo = '+init=epsg:3338',
keepCols = c('sex'), dailymean = TRUE)
# Summarize and find individual
summary(ds.mt)
plot(ds.mt)
#240653478 or 240653490
di <- subset(ds.mt, id == 240653490)
# Plot movement tracks to identify migrations and use
# with locator below
par(mfrow=c(2,1), mar = c(0,0,0,0), oma = c(5,5,2,2))
with(di, plot(day, x, type='o'))
with(di, plot(day, y, type='o'))
# Use locator to bracket each individual (i.e., directional) migration
span1 <- locator(4)$x
span2 <- locator(4)$x
di.migrations <- fitMultiMigration(di, span1, span2, plot = TRUE)
di.migrations
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.