crop.plus_plot2D: A two dimensional plot (xy scatterplot) of linear...

View source: R/crop.plus_plot2D.R

crop.plus_plot2DR Documentation

A two dimensional plot (xy scatterplot) of linear discriminant scores from LDAcrop.plus in comparison to the ethnographic model's scores

Description

This function plots the linear discriminant scores from LDAcrop.plus as a 2D graph.

Usage

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))

Arguments

data

The data frame containing the results of the LDAcrop.plus function

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))

Details

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

Author(s)

Elizabeth Stroud

References

PAPER reference

See Also

LDAcrop.plus

Examples

## 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)


elizabethastroud/Cropprocessing documentation built on Sept. 27, 2024, 3:03 p.m.