data("avoca")
avoca_D_man <- vegclust::vegdiststruct(avoca_strat,
method ="manhattan",
transform = function(x){log(x+1)})
years <- c(1971, 1974, 1978, 1983, 1987, 1993, 1999, 2004, 2009)
avoca_times <- years[avoca_surveys]
avoca_x <- defineTrajectories(d = avoca_D_man,
sites = avoca_sites,
times = avoca_times)
#Raw output with asymmetric convergence test (default)
trajectoryConvergencePlot(avoca_x)
#More refined output with both type of tests and only plotting significant
#test results (p-value < 0.05)
trajectoryConvergencePlot(avoca_x,
type = "both",
alpha.filter = 0.05)
#Much more refined output with nicer colors, bigger half arrows,
#personalized trajectory names, controlling the size of circles representing
#trajectories and border customization.
trajectoryConvergencePlot(avoca_x,type = "both",alpha.filter = 0.05,
half.arrows.size = 1.5,
conv.color = "orangered",
div.color = "dodgerblue",
radius = 1.2,
traj.colors = "black",border = "white",lwd = 2,
traj.names = LETTERS[1:8],traj.names.colors = "white")
#RTMA version.
avoca_RTMA <- trajectoryRMA(avoca_x)
trajectoryConvergencePlot(avoca_RTMA,
half.arrows.size = 1.5,
conv.color = "orangered",
div.color = "dodgerblue",
radius = 1.2,
traj.colors = "black",border = "white",lwd = 2,
traj.names = LETTERS[1:8],traj.names.colors = "white")
Run the code above in your browser using DataLab