View source: R/crop.plus_plot2D.R
crop.plus_plot2D | R Documentation |
LDAcrop.plus
in comparison to the ethnographic model's scores
This function plots the linear discriminant scores from LDAcrop.plus
as a 2D graph.
crop.plus_plot2D(data,Func1=1, Func2=2, ylims=NULL, xlims=NULL, gcols=NULL,gbg=NULL,
gpchs=NULL, col ='black', bg='black', pch=15, site="Archaeological", label=NULL, pos=c(0,-0.3))
data |
The data frame containing the results of the |
Func1 |
The linear discriminant function to be plotted on the x axis |
Func2 |
The linear discriminant function to be plotted on the y axis |
ylims |
The limits of the y axis expressed as c(min, max) |
xlims |
The limits of the x axis expressed as c(min, max) |
gcols |
The colours of the symbols of the modern crop processing groups expressed as for example c("pink", "red", etc) |
gbg |
The colour of the background of the symbols of the ethnographical crop processing groups (expressed c("red", "green"...) etc. The default produces a black and white plot) |
gpchs |
The symbols of the modern crop processing groups expressed as for example c(1,2,3,4) |
col |
The colour of the archaeobotanical samples |
bg |
The background(fill) colours for open plot symbols with a pch = 21:25, see points |
pch |
The symbol of the archaeobotanical samples |
site |
The name of the archaeobotanical samples to appear in the legend |
label |
The name of the sample(s) to be labelled on the graph |
pos |
The position of the label (format c(x,y)) |
The data frame entered as argument x can be the output of LDAcrop.plus
or from manual transformation. However the data frame must have column labelled LD1, LD2, LD3 containing the linear discriminant scores
Elizabeth Stroud
PAPER reference
LDAcrop.plus
## Random data
BHH<-runif(40, min=0, max=7)
BFH<-runif(40, min=0, max=24)
SHH<-runif(40, min=1, max=13)
SHL<-runif(40, min=0.5, max=17)
SFH<-runif(40, min=1, max=22)
SFL<-runif(40, min=1, max=8)
Sample<-sample(1:40, 40, replace=FALSE)
data<-data.frame(Sample,BHH,BFH,SHH,SHL,SFH,SFL)
results<-LDAcrop.plus(data)
## Usage
crop.plus_plot2D(results)
##Plot different LD function
crop.plus_plot2D(results, Func1=2, Func2=3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.