Description Usage Arguments Details Value See Also Examples
Standardized plotting of environmental and temporal information for a set of coordinate pairs.
1 2 3 4 5 6 7 8 |
x |
Vector of x coordinates. |
y |
Vector of y coordinates. |
size.var |
Optional. Controls the point size. |
fill.var |
Optional. Controls the fill color. |
var.type |
One of 'cont' or 'cat'. Defines the type of fill.var. |
var.names |
Character vector with names for size.var and fill.var to ve added to the plot. |
This function was designed to extent on other functions such as dataQuery
, which provides environmental
information, and moveReduce
, which provides information on e.g. the time spent per sample. Using these two functions
as an example, plotMove can represent the relation between the elapsed time and the change in environmental conditions.
A ggplot object.
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 | {
require(raster)
# read raster data
r <- raster(system.file('extdata', '2013-07-16_ndvi.tif', package="rsMove"))
# read movement data
data(shortMove)
# observation time
time <- strptime(paste0(shortMove@data$date, ' ', shortMove@data$time), format="%Y/%m/%d %H:%M:%S")
# reduce amount of samples
move.reduce <- moveReduce(shortMove, r, time)
# query data
ov <- extract(r, move.reduce$points)
# plot output
x <- move.reduce$points@data$x
y <- move.reduce$points@data$y
et <- move.reduce$points@data$elapsed.time
op <- plotMove(x, y, size.var=et, fill.var=ov, var.type="cont")
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.