wplot_phase | R Documentation |
A function which plots the samples' linear discriminant scores from wmodel.LDA
compared to the chosen modern model's group centroids as stacked graphs depending on number of grouping variables (i.e. sites or phase).
wplot_phase(model, x,
site= c("phase 1", "phase 2", "phase 3", "phase 4", "phase 5"),
g1=NULL, g2= NULL, g3=NULL, g4=NULL, g5=NULL,
gcol=c("black","black","black","black", "black"),
gpch=c(22,23,24,8,4), gbg=c("grey","grey","grey","grey", "grey"), pcolumn, compact= FALSE,
priority= "density", xlims= NULL, ylims = NULL, ticks =NULL, xlab="Discriminant function",
lines=TRUE, lcex=1)
model |
Either "model1", "model2" or "model3" - following |
x |
The output from |
site |
The names to appear in the legend |
g1 |
Name of phase/site group 1 in pcolumn |
g2 |
Name of phase/site group 2 in pcolumn |
g3 |
Name of phase/site group 3 in pcolumn |
g4 |
Name of phase/site group 4 in pcolumn |
g5 |
Name of phase/site group 5 in pcolumn |
gcol |
Symbol colour for athe entered samples' phases |
gpch |
Symbol shape for the entered samples' phases |
gbg |
Symbol infill colour if using pch 21,22,23,24 or 25 |
pcolumn |
The column with the phases of each sample from the dataframe x |
compact |
Follows |
priority |
Follows the |
xlims |
The x axis limits |
ylims |
The y axis limits |
ticks |
The location of the x axis ticks |
xlab |
x axis label |
lines |
Adds lines from group centroid to x-axis |
lcex |
Size of the legend text |
Elizabeth Stroud
wmodel.LDA
, wplot_geog
, wplot_basic
## Example dataset
LD1<-runif(40, min=-6.6, max=6)
Study<-sample(1:3, 40, replace=TRUE)
data<-data.frame(Study,LD1)
## If using defaults
wplot_phase( "model1", data, pcolumn= data$Study, g1=1, g2=2, g3=3,
site=c("phase 1", "phase 2", "phase 3"))
## Changes to colour and symbol type
wplot_phase( "model1", data, pcolumn= data$Study, g1=1, g2=2, g3=3,
site=c("phase 1", "phase 2", "phase 3"),gpch = c(24,4,22), gbg = c("red","black","grey"),
gcol=c("black","black","black"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.