Description Usage Arguments Details Value See Also Examples
Pixel based segmentation of movement data using environmental data.
1 2 3 4 5 6 7 8 9 10 |
x |
Object of class RasterLayer or data.frame. |
z |
Object of class Date, POSIXlt or POSIXct. |
y |
Object of class SpatialPoints or SpatialPointsDataFrame. |
data.type |
Raster data data.type. One of cont (continuous) or cat (for categorical). |
threshold |
Change threshold. Required if data.type is set to cat. |
summary.fun |
Summary function used to summarize the values within each segment when method is cont. Default is mean. |
buffer.size |
Spatial buffer size applied around each segment (unit depends on spatial projection). |
smooth.fun |
Smoothing function applied with buffer.size when method is cont. Default is mean. |
This function identifies segments of comparable environmental conditions along a movement track given by y. Looking at consecutive data points, the function queries x and proceeds to identify a new segment if threshold is exceeded. Then, for each segment, the function summarizes x using summary.fun and reports on the amount of points found within it. Moreover, if z is set, the function reports on the start and end timestamps and the elapsed time for each segment. If data.type is set as 'cont', the function assumes y is a continuous variable. This will require the user to define threshold which indicates when the difference between consecutive points should be considered as a change. If data.type is set as 'cat', then the function will ignore threshold and map a change every time a change in value occurs. The user might choose to smooth the extracted values using buffer.size. This will prompt the function to summarize the values arounde ach sample in y using a metric define bysmooth.fun. However, if data.type is set to cat, smooth.fun is ignored. In this case, the function will report on the majority value within the spatial buffer. The output of this function consists of:
segment.id - Vector reporting on the segment identifiers associated to each sample in y.
segment.stats - Statistical information for each segment reporting on the corresponding environmental and temporal information.
segment.plot - plot of stats showing the variability of environmental conditions and time spent per segment.
A list.
dataQuery
imgInt
timeDir
spaceDir
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | {
require(raster)
# read raster data
r <- raster(system.file('extdata', 'landCover.tif', package="rsMove"))
# read movement data
data(shortMove)
# observation time
z <- strptime(paste0(shortMove@data$date, ' ', shortMove@data$time),
format="%Y/%m/%d %H:%M:%S")
# perform directional sampling
seg <- moveSeg(r, z, shortMove, data.type="cat")
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.