plotWeights: Plots time-dependent weight-trajectories for several...

Description Usage Arguments Examples

Description

Preliminary plot of individual weight-trajectories

Usage

1
plotWeights(w, t, g, n = 100)

Arguments

w

Weights

t

Time

g

Id

n

Number of trajectories to plot, defaults to 100

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (w, t, g, n = 100) 
{
    ug <- unique(g)[1:n]
    plot(NULL, xlim = c(min(t), min(max(t), 2990)), ylim = c(0.4, 
        3), xlab = "time", ylab = "weights")
    for (v in ug) {
        J <- which(v == g)
        lines(t[J], w[J], type = "s", col = "#00000022")
    }
  }

kjetilroysland/ahw documentation built on May 20, 2019, 10:25 a.m.