View source: R/Plotting Functions.R
boxplot.tsa.object | R Documentation |
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.
## S3 method for class 'tsa.object'
boxplot(tsa.object, ...)
tsa.object |
An object from tsa.test() |
... |
Arguments passed to boxplot() |
#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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.