diff --git a/DESCRIPTION b/DESCRIPTION index 46beaed6..4a11692e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -18,21 +18,21 @@ Depends: R (>= 3.0) Imports: dplyr, - tidyr -Suggests: - rmarkdown, - knitr, - testthat, - pander, + tidyr, DT, leaflet, - formattable, ggplot2, gridExtra, grid, shiny, data.table, RColorBrewer +Suggests: + rmarkdown, + testthat, + pander, + formattable, + knitr VignetteBuilder: knitr BuildVignettes: true LazyLoad: yes diff --git a/NAMESPACE b/NAMESPACE index 717122c6..24b58766 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -8,9 +8,36 @@ export(chemSummBasic) export(endPointInfo) export(endPointSumm) export(endPointToxCreate) +export(explore_endpoints) export(siteSumm) export(totalSamples) -import(dplyr) -importFrom(tidyr,gather) -importFrom(tidyr,gather_) -importFrom(tidyr,separate) +import(DT) +import(RColorBrewer) +import(data.table) +import(ggplot2) +import(grid) +import(gridExtra) +import(tidyr) +importFrom(dplyr,arrange) +importFrom(dplyr,desc) +importFrom(dplyr,distinct) +importFrom(dplyr,filter) +importFrom(dplyr,filter_) +importFrom(dplyr,group_by) +importFrom(dplyr,group_by_) +importFrom(dplyr,left_join) +importFrom(dplyr,mutate) +importFrom(dplyr,mutate_) +importFrom(dplyr,rename) +importFrom(dplyr,rename_) +importFrom(dplyr,right_join) +importFrom(dplyr,select) +importFrom(dplyr,select_) +importFrom(dplyr,summarise) +importFrom(dplyr,summarize) +importFrom(leaflet,addCircles) +importFrom(leaflet,addLegend) +importFrom(leaflet,clearControls) +importFrom(leaflet,clearShapes) +importFrom(leaflet,leaflet) +importFrom(shiny,runApp) diff --git a/R/chemSumm.R b/R/chemSumm.R index d67e0be4..64e69c36 100644 --- a/R/chemSumm.R +++ b/R/chemSumm.R @@ -8,7 +8,6 @@ #' @param classCol column name of chemical class #' @param siteCol column name of site #' @param dateCol column name of date -#' @import dplyr #' @export #' @examples #' wData <- wData @@ -73,10 +72,7 @@ chemSumm <- function(chemicalSummary,EAR.key="EAR",chnmCol="chnm", #' @param code_pCode character name of code column in pCodeInfo #' @param casrn_ep character name of class column in endPoint #' @return chemicalSummary data frame -#' @import dplyr -#' @importFrom tidyr gather_ -#' @importFrom tidyr gather -#' @importFrom tidyr separate +#' @import tidyr #' @export #' @examples #' wData <- wData @@ -114,7 +110,6 @@ chemSummBasic <- function(wData, pCodeInfoDF,endPoint, #' @param units_pCode character name of units column in pCodeInfo #' @param mlWt_pCode character name of molecular weight column in pCodeInfo #' @return endPoint data frame -#' @import dplyr #' @export #' @examples #' pCodeInfo <- pCodeInfo diff --git a/R/endPointSumm.R b/R/endPointSumm.R index d90d8f8d..178f6fde 100644 --- a/R/endPointSumm.R +++ b/R/endPointSumm.R @@ -8,15 +8,16 @@ #' @param endPointInfo dataframe #' @param endPointInfo.Key column name of endpoint #' @param EAR.key column name in chemicalSummary of EAR -#' @import dplyr #' @export #' @examples +#' \dontrun{ #' wData <- wData #' pCodeInfo <- pCodeInfo #' endPoint <- endPointToxCreate(pCodeInfo) #' chemicalSummary <- chemSummBasic(wData,pCodeInfo,endPoint) #' endPointInfo <- endPointInfo #' epSumm <- endPointSumm(chemicalSummary, endPointInfo=endPointInfo) +#' } endPointSumm <- function(chemicalSummary, chemicalSummary.Key="endPoint",chemicalSummary.site="site", endPointInfo, endPointInfo.Key = "assay_component_endpoint_name", EAR.key="EAR"){ diff --git a/R/explore_endpoints.R b/R/explore_endpoints.R new file mode 100644 index 00000000..cb72553c --- /dev/null +++ b/R/explore_endpoints.R @@ -0,0 +1,22 @@ +#' Explore endpoint groupings +#' +#' Open an interactive app +#' +#' @param browse use browser for map rendering +#' @export +#' @importFrom shiny runApp +#' @importFrom leaflet leaflet +#' @importFrom leaflet addLegend +#' @importFrom leaflet addCircles +#' @importFrom leaflet clearControls +#' @importFrom leaflet clearShapes +#' @import tidyr +#' @import DT +#' @import ggplot2 +#' @import data.table +#' @import RColorBrewer +#' @import grid +#' @import gridExtra +explore_endpoints <- function(browse=TRUE){ + runApp(system.file('shiny', package='toxEval'), launch.browser = browse) +} \ No newline at end of file diff --git a/R/siteSumm.R b/R/siteSumm.R index bf510b1d..a43129ea 100644 --- a/R/siteSumm.R +++ b/R/siteSumm.R @@ -4,9 +4,9 @@ #' #' @param chemicalSummary data frame returned from \code{chemSummBasic} #' @param newSiteKey named vector -#' @import dplyr #' @export #' @examples +#' \dontrun{ #' wData <- wData #' pCodeInfo <- pCodeInfo #' packagePath <- system.file("extdata", package="toxEval") @@ -16,6 +16,7 @@ #' endPoint <- endPointToxCreate(pCodeInfo) #' chemicalSummary <- chemSummBasic(wData,pCodeInfo,endPoint) #' siteSummary <- siteSumm(chemicalSummary,newSiteKey) +#' } siteSumm <- function(chemicalSummary,newSiteKey){ siteSummary <- chemicalSummary %>% diff --git a/R/totalSamples.R b/R/totalSamples.R index 9f227ac2..90d75e1b 100644 --- a/R/totalSamples.R +++ b/R/totalSamples.R @@ -5,7 +5,6 @@ #' @param chemicalSummary data frame returned from \code{chemSummBasic} #' @param chemicalSummary.Key character column name for grouping by (default = "endPoint") #' @param chemicalSummary.site character column name for group by site -#' @import dplyr #' @export #' @examples #' wData <- wData diff --git a/R/toxEval.R b/R/toxEval.R index 50338183..d4ab9812 100644 --- a/R/toxEval.R +++ b/R/toxEval.R @@ -21,6 +21,23 @@ #' #' @name toxEval-package #' @docType package +#' @importFrom dplyr filter +#' @importFrom dplyr rename +#' @importFrom dplyr group_by +#' @importFrom dplyr summarize +#' @importFrom dplyr summarise +#' @importFrom dplyr select +#' @importFrom dplyr arrange +#' @importFrom dplyr distinct +#' @importFrom dplyr left_join +#' @importFrom dplyr right_join +#' @importFrom dplyr desc +#' @importFrom dplyr filter_ +#' @importFrom dplyr rename_ +#' @importFrom dplyr mutate +#' @importFrom dplyr group_by_ +#' @importFrom dplyr select_ +#' @importFrom dplyr mutate_ #' @author Steven Corsi \email{srcorsi@@usgs.gov}, Laura De Cicco \email{ldecicco@@usgs.gov} #' @keywords ToxCast NULL diff --git a/inst/doc/SummaryToxCast.R b/inst/doc/SummaryToxCast.R index e4efa92f..097480e8 100644 --- a/inst/doc/SummaryToxCast.R +++ b/inst/doc/SummaryToxCast.R @@ -10,6 +10,7 @@ library(leaflet) library(formattable) library(ggplot2) library(gridExtra) +library(data.table) pCodeInfo <- pCodeInfo wData <- wData @@ -119,7 +120,10 @@ chemicalSummary_passive <- passiveData %>% select(-mlWt, -conversion, -casrn, -Units) %>% gather(endPoint, endPointValue, -class, -site, -measuredValue, -chnm) %>% filter(!is.na(endPointValue)) %>% - mutate(EAR=measuredValue/endPointValue) + mutate(EAR=measuredValue/endPointValue) %>% + mutate(hits = as.numeric(EAR > 0.1), + endPoint=as.character(endPoint)) %>% + filter(!is.na(EAR)) chemicalSummary_passive <- chemicalSummary_passive %>% mutate(site=paste0("USGS-",gsub("[^0-9]", "", as.character(site))))%>% @@ -220,7 +224,6 @@ datatable(chemSum2[,-6], rownames = FALSE, chemSum3 <- chemicalSummary %>% - mutate(hits= as.numeric(EAR > 0.1)) %>% group_by(chnm, class, site, endPoint) %>% summarize(hits=as.numeric(any(hits > 0)), maxEAR=max(EAR)) %>% @@ -228,10 +231,11 @@ chemSum3 <- chemicalSummary %>% summarize(freq=sum(hits)/n_distinct(site), nSites=sum(hits), maxEAR=max(maxEAR)) %>% - mutate(endPoint=as.character(endPoint))%>% - left_join(endPointInfo, by=c("endPoint"="assay_component_endpoint_name")) %>% + rename(assay_component_endpoint_name=endPoint) %>% + data.table() %>% + left_join(data.table(endPointInfo), by="assay_component_endpoint_name") %>% select(chnm, maxEAR, freq, nSites, - endPoint, class, contains("intended_target_")) %>% + endPoint=assay_component_endpoint_name, class, contains("intended_target_")) %>% rename(type=intended_target_type, type_sub=intended_target_type_sub, family=intended_target_family, family_sub=intended_target_family_sub) %>% select(-contains("intended_target_")) %>% @@ -244,24 +248,9 @@ chemSum3 <- chemicalSummary %>% formatRound(c("maxEAR", "freq"), digits = 2) -totalSamples_ep <- select(chemicalSummary,site,endPoint) %>% - distinct()%>% - group_by(endPoint) %>% - summarise(totalSites=n())%>% - mutate(endPoint=as.character(endPoint)) +endpointSummary <- endPointSumm(chemicalSummary, endPointInfo=endPointInfo) -endpointSummary <- chemicalSummary %>% - mutate(hits= as.numeric(EAR > 0.1)) %>% - group_by(site, endPoint) %>% - summarize(hits=as.numeric(any(hits > 0)), - maxEAR=max(EAR)) %>% - group_by(endPoint) %>% - summarize(nSites=sum(hits), - maxEAR=max(maxEAR)) %>% - mutate(endPoint=as.character(endPoint))%>% - left_join(endPointInfo, by=c("endPoint"="assay_component_endpoint_name")) %>% - left_join(totalSamples_ep, by=c("endPoint")) %>% - mutate(freq=nSites/totalSites)%>% +endpointSummary <- endpointSummary %>% select(endPoint, maxEAR, freq, nSites, endPoint, contains("intended_target_")) %>% rename(type=intended_target_type, type_sub=intended_target_type_sub, @@ -394,8 +383,8 @@ datatable(chemSum2_passive_dt, rownames = FALSE, chemSum3_passive <- chemicalSummary_passive %>% - group_by(chnm, class, site, endPoint) %>% - summarize(hits= as.numeric(any(EAR > 0.1))) %>% +# group_by(chnm, class, site, endPoint) %>% +# summarize(hits= as.numeric(any(EAR > 0.1))) %>% group_by(chnm, class, endPoint) %>% summarize(freq=sum(hits)/n_distinct(site), nSites=sum(hits)) diff --git a/inst/doc/SummaryToxCast.Rmd b/inst/doc/SummaryToxCast.Rmd index aab864c2..8753786a 100644 --- a/inst/doc/SummaryToxCast.Rmd +++ b/inst/doc/SummaryToxCast.Rmd @@ -25,6 +25,7 @@ library(leaflet) library(formattable) library(ggplot2) library(gridExtra) +library(data.table) pCodeInfo <- pCodeInfo wData <- wData @@ -136,7 +137,10 @@ chemicalSummary_passive <- passiveData %>% select(-mlWt, -conversion, -casrn, -Units) %>% gather(endPoint, endPointValue, -class, -site, -measuredValue, -chnm) %>% filter(!is.na(endPointValue)) %>% - mutate(EAR=measuredValue/endPointValue) + mutate(EAR=measuredValue/endPointValue) %>% + mutate(hits = as.numeric(EAR > 0.1), + endPoint=as.character(endPoint)) %>% + filter(!is.na(EAR)) chemicalSummary_passive <- chemicalSummary_passive %>% mutate(site=paste0("USGS-",gsub("[^0-9]", "", as.character(site))))%>% @@ -294,7 +298,6 @@ This table focuses on the individual endpoint/compound combinations and the prev chemSum3 <- chemicalSummary %>% - mutate(hits= as.numeric(EAR > 0.1)) %>% group_by(chnm, class, site, endPoint) %>% summarize(hits=as.numeric(any(hits > 0)), maxEAR=max(EAR)) %>% @@ -302,10 +305,11 @@ chemSum3 <- chemicalSummary %>% summarize(freq=sum(hits)/n_distinct(site), nSites=sum(hits), maxEAR=max(maxEAR)) %>% - mutate(endPoint=as.character(endPoint))%>% - left_join(endPointInfo, by=c("endPoint"="assay_component_endpoint_name")) %>% + rename(assay_component_endpoint_name=endPoint) %>% + data.table() %>% + left_join(data.table(endPointInfo), by="assay_component_endpoint_name") %>% select(chnm, maxEAR, freq, nSites, - endPoint, class, contains("intended_target_")) %>% + endPoint=assay_component_endpoint_name, class, contains("intended_target_")) %>% rename(type=intended_target_type, type_sub=intended_target_type_sub, family=intended_target_family, family_sub=intended_target_family_sub) %>% select(-contains("intended_target_")) %>% @@ -318,24 +322,9 @@ chemSum3 <- chemicalSummary %>% formatRound(c("maxEAR", "freq"), digits = 2) -totalSamples_ep <- select(chemicalSummary,site,endPoint) %>% - distinct()%>% - group_by(endPoint) %>% - summarise(totalSites=n())%>% - mutate(endPoint=as.character(endPoint)) +endpointSummary <- endPointSumm(chemicalSummary, endPointInfo=endPointInfo) -endpointSummary <- chemicalSummary %>% - mutate(hits= as.numeric(EAR > 0.1)) %>% - group_by(site, endPoint) %>% - summarize(hits=as.numeric(any(hits > 0)), - maxEAR=max(EAR)) %>% - group_by(endPoint) %>% - summarize(nSites=sum(hits), - maxEAR=max(maxEAR)) %>% - mutate(endPoint=as.character(endPoint))%>% - left_join(endPointInfo, by=c("endPoint"="assay_component_endpoint_name")) %>% - left_join(totalSamples_ep, by=c("endPoint")) %>% - mutate(freq=nSites/totalSites)%>% +endpointSummary <- endpointSummary %>% select(endPoint, maxEAR, freq, nSites, endPoint, contains("intended_target_")) %>% rename(type=intended_target_type, type_sub=intended_target_type_sub, @@ -504,8 +493,8 @@ This table focuses on the individual endpoint/compound combinations, and the pre chemSum3_passive <- chemicalSummary_passive %>% - group_by(chnm, class, site, endPoint) %>% - summarize(hits= as.numeric(any(EAR > 0.1))) %>% +# group_by(chnm, class, site, endPoint) %>% +# summarize(hits= as.numeric(any(EAR > 0.1))) %>% group_by(chnm, class, endPoint) %>% summarize(freq=sum(hits)/n_distinct(site), nSites=sum(hits)) diff --git a/inst/doc/SummaryToxCast.html b/inst/doc/SummaryToxCast.html index f1b72b87..8fe03539 100644 --- a/inst/doc/SummaryToxCast.html +++ b/inst/doc/SummaryToxCast.html @@ -15,9 +15,9 @@ - + - + @@ -39,7 +39,7 @@
As an initial exploration of limitations of using ToxCast with the water sample data, ToxCast endpoints were compared with detection levels for each analyzed compound. The exposure:activity ratio (EAR) for a concentration at the detection level for the endpoint with the minimum AC50 for that chemical is presented in this table. Only compounds with detection levels great than 10% of the lowest AC50 are included.
- - + +This table focuses on the individual compounds and the prevalence of potential adverse biological effects (57 total sites). The table can be sorted by the fraction of sites with hits, maximum EAR, and number of endpoints with hits to evaluate results based on different priorities. “Hits” are defined as EAR > 0.1, indicating that the measured concentration is 10% of the AC50 or greater.
- - + +This table focuses on the individual endpoint/compound combinations and the prevalence of potential adverse biological effects (57 total sites). The table can be sorted by the fraction of sites with hits, maximum EAR, endpoints with hits, and several variables that describe the ToxCast endpoints to evaluate results based on different priorities. “Hits” are defined as EAR > 0.1, indicating that the measured concentration is 10% of the AC50 or greater.
- - - + + +This table focuses on the individual sites and the prevalence of potential adverse biological effects (39 total chemicals included in ToxCast). The table can be sorted by the fraction of samples with hits, number of chemicals with hits, number of endpoints with hits, maximum EAR, and land cover attributes to evaluate results based on different priorities. “Hits” are defined as EAR > 0.1, indicating that the measured concentration is 10% of the AC50 or greater.
- - + +As an initial exploration of limitations of using ToxCast with the passive data, ToxCast endpoints were compared with detection levels (MQL) for each analyzed compound. The exposure:activity ratio (EAR) for a concentration at the detection level is presented in this table. Only compounds with detection levels great than 10% of the lowest AC50 are included.
- - + +This table focuses on the individual compounds, and the prevalence of potential adverse biological effects (57 total sites). The table can be sorted by the fraction of sites with hits, maximum exposure:activity ratio (EAR), and number of endpoints with hits to evaluate results based on different priorities. “Hits” are defined as EAR > 0.1, indicating that the measured concentration is 10% of the AC50 or greater.
- - + +This table focuses on the individual endpoint/compound combinations, and the prevalence of potential adverse biological effects (57 total sites). The table can be sorted by the fraction of sites with hits, maximum exposure:activity ratio (EAR), endpoints with hits, and several variables that describe the ToxCast endpoints to evaluate results based on different priorities. “Hits” are defined as EAR > 0.1, indicating that the measured concentration is 10% of the AC50 or greater.
-## Warning in left_join_impl(x, y, by$x, by$y): joining character vector and
-## factor, coercing into character vector
-
-
+
+
This table focuses on the individual sites, and the prevalence of potential adverse biological effects (51 total chemicals included in ToxCast). The table can be sorted by number of chemicals with hits, number of endpoints with hits, maximum exposure:activity ratio (EAR), and land cover attributes to evaluate results based on different priorities. “Hits” are defined as EAR > 0.1, indicating that the measured concentration is 10% of the AC50 or greater.
- - + +As an initial exploration of limitations of using water quality guidelines with the water sample data, water quality guidelines endpoints were compared with detection levels for each analyzed compound. The exposure:activity ratio (EAR) for a concentration at the detection level is presented in this table. Only compounds with detection levels great than 10% of the lowest AC50 are included.
- - + +This table focuses on the individual compounds, and the prevalence of potential adverse biological effects (57 total sites). The table can be sorted by the fraction of sites with hits, maximum EAR, and number of endpoints with hits to evaluate results based on different priorities.“Hits” are defined as EAR > 0.1, indicating that the measured concentration is 10% of the AC50 or greater.
- - + +This table focuses on the individual endpoint/compound combinations, and the prevalence of potential adverse biological effects (57 total sites). The table can be sorted by the fraction of sites with hits, maximum EAR, endpoints with hits, and several variables that describe the water quality benchmark endpoints to evaluate results based on different priorities.“Hits” are defined as EAR > 0.1, indicating that the measured concentration is 10% of the AC50 or greater.
- - + +This map summarizes the water sample ToxCast results by showing maximum exposure:activity ratio (EAR) for each site as the color scale, and number of chemicals with hits as the symbol size. Additional information is available by clicking on the points.
Color: Maximum EAR
Size: Number of chemicals with hits (0-19)
This map summarizes the passive ToxCast results by showing maximum exposure:activity ratio (EAR) for each site as the color scale, and number of chemicals with hits as the symbol size. Additional information is available by clicking on the points.
Color: Maximum EAR
Size: Number of chemicals with hits (0-3)
This map summarizes the passive water quality guideline results by showing maximum exposure:activity ratio (EAR) for each site as the color scale, and number of chemicals with hits as the symbol size. Additional information is available by clicking on the points.
Color: Maximum EAR
Size: Number of chemicals with hits (0-10)
library(toxEval)
+library(DT)
+library(dplyr)
+library(tidyr)
+
+wData <- wData
+pCodeInfo <- pCodeInfo
+
+packagePath <- system.file("extdata", package="toxEval")
+filePath <- file.path(packagePath, "stationINFO.RData")
+load(file=filePath)
+
+endPoint <- endPointToxCreate(pCodeInfo)
+chemicalSummary <- chemSummBasic(wData,pCodeInfo,endPoint)
+endPointInfo <- endPointInfo
+# epSumm <- endPointSumm(chemicalSummary, endPointInfo=endPointInfo)
+
+siteKey <- setNames(stationINFO$shortName, stationINFO$fullSiteID)
+summary <- siteSumm(chemicalSummary,siteKey)
+group <- "transcription factor"
+groupCol <- "intended_target_type_sub"
+chemicalSummary.site <- "site"
+chemicalSummary.Key <- "endPoint"
+chemicalSummary.Date <- "date"
+funcToSummerise <- "sumEAR"
+
+endPointInfoSub <- select_(endPointInfo, "assay_component_endpoint_name", groupCol) %>%
+ unique()
+
+chemicalSummary <- chemicalSummary %>%
+ filter(endPoint %in% endPointInfoSub$assay_component_endpoint_name ) %>%
+ left_join(endPointInfoSub,
+ by=c("endPoint"="assay_component_endpoint_name"))
+
+groupSumm <- chemicalSummary %>%
+ group_by(site) %>%
+ summarise(nChem = length(unique(chnm)),
+ nEndPoints = length(unique(endPoint))) %>%
+ select(nChem,nEndPoints) %>%
+ mutate(nChem = median(nChem),
+ nEndPoints = median(nEndPoints)) %>%
+ unique()
+
+endpointSummary <- chemicalSummary %>%
+ filter_(paste0(groupCol," == '", group, "'")) %>%
+ select_("hits","EAR","endPoint",
+ chemicalSummary.site,chemicalSummary.Date,groupCol) %>%
+ group_by_(chemicalSummary.site, chemicalSummary.Date) %>%
+ summarise(sumEAR = sum(EAR),
+ nHits = sum(hits))
+
+statsOfSum <- endpointSummary%>%
+ group_by_(chemicalSummary.site) %>%
+ summarise_(meanEAR = paste0("mean(",funcToSummerise,")"),
+ # medianEAR = paste0("median(",funcToSummerise,")"),
+ maxEAR = paste0("max(",funcToSummerise,")"),
+ sumHits = "sum(nHits)",
+ nSamples = "n()")%>%
+ data.frame()%>%
+ mutate(site = siteKey[site])
+
+
+
+
+
+datatable(statsOfSum, rownames = FALSE,
+ caption=paste("Summary of", funcToSummerise, "of",group)) %>%
+ formatRound(c("meanEAR","maxEAR","sumHits","nSamples"),
+ digits = 1)
+
+
+library(ggplot2)
+
+siteLimits <- stationINFO %>%
+ mutate(lakeCat = factor(Lake,
+ levels=c("Lake Superior","Lake Michigan",
+ "Lake Huron", "St. Lawrence River",
+ "Detroit River and Lake St. Clair","Lake Erie","Lake Ontario"))) %>%
+ arrange(lakeCat) %>%
+ mutate(lakeColor = c("red","black","green","brown","brown","brown","blue")[as.numeric(lakeCat)] ) %>%
+ filter(fullSiteID %in% unique(endpointSummary$site))
+
+
+endPointSummBP <- endpointSummary %>%
+ data.frame()%>%
+ mutate(site = siteKey[site]) %>%
+ mutate(site = factor(site, levels=siteLimits$Station.shortname))
+
+sToxWS <- ggplot(endPointSummBP, aes(x=site, y=sumEAR)) +
+ geom_boxplot() +
+ theme(axis.text.x = element_text(angle = 90, hjust = 1,vjust=0.25, colour=siteLimits$lakeColor),
+ legend.position = "none")+
+ scale_x_discrete(limits=siteLimits$Station.shortname) +
+ # scale_y_log10(limits=c(0.03,5000)) +
+ # labs(x = "Site") +
+ geom_text(data=data.frame(), aes(x=c(5, 18,31,45,56),
+ y=-.5, label=c("Superior","Michigan","Huron","Erie","Ontario")),
+ colour=factor(c("red","black","green","brown","blue"),
+ levels=c("red","black","green","brown","blue")), size=3)
+
+sToxWS
+