boxplot.tsa.object: z-score Boxplots

View source: R/Plotting Functions.R

boxplot.tsa.objectR Documentation

z-score Boxplots

Description

Boxplots of z-scores used in Test Site Analysis. Metrics used in calculation of TSA are circled, metrics that contribute significantly to an impairment score are marked with an * along the x axis.

Usage

## S3 method for class 'tsa.object'
boxplot(tsa.object, ...)

Arguments

tsa.object

An object from tsa.test()

...

Arguments passed to boxplot()

Examples

#load datasets
data(YKEnvData,envir = environment()) #Biological dataset
data(YKBioData,envir = environment()) #Environmental dataset

#Calculate indicator metrics from raw biological data
bio.data.test<-benth.met(YKBioData,2,2)

#Extract just the summary metrics
bio.data<-bio.data.test$Summary.Metrics

#standardize row names between datasets
rownames(YKEnvData)<-bio.data.test$Site.List

#Match a test site (#201) to the nearest neighbour reference set
nn.sites<-site.match(YKEnvData[201,-c(1)],YKEnvData[1:118,-c(1)],k=NULL,adaptive=T)

#Calculate additional metrics based on selected Reference sites
taxa.data<-add.met(Test=bio.data.test$Raw.Data[201,],Reference=bio.data.test$Raw.Data[names(nn.sites$final.dist),])

#TSA test of indicator metrics at test site and reference sites selected used site.match()
tsa.results<-tsa.test(Test=taxa.data[nrow(taxa.data),],Reference=taxa.data[names(nn.sites$final.dist),],distance=nn.sites$final.dist, outlier.rem=T, m.select=T)
tsa.results

Evaluate Results
boxplot(tsa.results)

p-schaefer/BenthicAnalysis documentation built on May 3, 2023, 5:49 a.m.