scan_track: scan_track

Description Usage Arguments Examples

View source: R/scan_track.R

Description

Plotting x-y, time-x, time-y scan of a track. This function will take x, y, and time coordinates or a track class object

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
scan_track(
  track = NULL,
  time,
  x,
  y = NULL,
  layout = NULL,
  auto.par = NULL,
  col = 1,
  alpha = 0.5,
  cex = 0.5,
  ...
)

Arguments

track

a track class object, or any data-frame that contains (at least) three columns labeled "T", "X" and "Y"

time

time (can be a POSIXt)

x

x Coordinate. x,y coordiantes an be two separate vectors OR a complex "x" OR a two-column matrix/date-frame.

y

y coordinate.

layout

the default layout places the x-y plot on the left and the respective 1-d time series on the right.

auto.par

by default, uses a decent looking default layout. Otherwise can be a par list, or, e.g. FALSE to keep externally defined settings.

col

color vector t

alpha

intensity of the color

cex

character expansion of the points

...

options to be passed to plot functions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Roe deer data

data(Michela)
par(bty="l", mar = c(0,4,0,2), oma=c(4,0,4,0), xpd=NA) 
with(Michela, scan_track(time = time, x = x, y = y, main="Michela"))

## Simulated track

time <- 1:200
Mean <- getMu(T = time, p.m = c(x1 = 0, y1 = 0, x2 = 10, y2 = 10, t1 = 90, dt = 20))
SimTrack <- simulate_shift(T = time, tau = c(tau.z = 5), mu = Mean, A = 40)
with(SimTrack, scan_track(time = T, x = X, y = Y))

# OR (because SimTrack is a "track")
scan_track(SimTrack)

EliGurarie/marcher documentation built on Oct. 17, 2020, 3:55 a.m.