The plot_tox_endpoints
function creates a set of boxplots representing EAR values for each endPoint based on the selected data. A subset of data is first chosen by specifying a group in the filterBy argument. The filterBy argument must match one of the unique options in the category. For example, if the category is "Chemical Class", then the filterBy argument must be one of the defined "Chemical Class" options such as "Herbicide". A boxplot is generated for each endPoint. The EAR values that are used to create the boxplots are the mean or maximum (as defined by mean_logic) for each site as described in "Summarizing the data"in the Introduction vignette: vignette("Introduction", package = "toxEval")
.
plot_tox_endpoints(
chemical_summary,
category = "Biological",
filterBy = "All",
manual_remove = NULL,
hit_threshold = NA,
mean_logic = FALSE,
sum_logic = TRUE,
font_size = NA,
title = NA,
x_label = NA,
palette = NA,
top_num = NA
)
Arguments
Data frame from get_chemical_summary
.
Either "Biological", "Chemical Class", or "Chemical".
Character. Either "All" or one of the filtered categories.
Vector of categories to remove.
Numeric threshold defining a "hit".
Logical. TRUE
displays the mean sample from each site, FALSE
displays the maximum sample from each site.
logical. TRUE
sums the EARs in a specified grouping, FALSE
does not. FALSE
may be better for traditional benchmarks as opposed to ToxCast benchmarks.
Numeric to adjust the axis font size.
Character title for plot.
Character for x label. Default is NA which produces an automatic label.
Vector of color palette for fill. Can be a named vector to specify specific color for specific categories.
Integer number of endpoints to include in the graph. If NA, all endpoints will be included.
# This is the example workflow:
path_to_tox <- system.file("extdata", package = "toxEval")
file_name <- "OWC_data_fromSup.xlsx"
full_path <- file.path(path_to_tox, file_name)
tox_list <- create_toxEval(full_path)
ACC <- get_ACC(tox_list$chem_info$CAS)
ACC <- remove_flags(ACC)
cleaned_ep <- clean_endPoint_info(end_point_info)
filtered_ep <- filter_groups(cleaned_ep)
chemical_summary <- get_chemical_summary(tox_list, ACC, filtered_ep)
plot_tox_endpoints(chemical_summary,
filterBy = "Cell Cycle",
top_num = 10
)
# \donttest{
plot_tox_endpoints(chemical_summary,
filterBy = "Cell Cycle",
top_num = 10,
x_label = "EAR"
)
plot_tox_endpoints(chemical_summary,
category = "Chemical Class", filterBy = "PAHs",
top_num = 10, hit_threshold = 0.001
)
plot_tox_endpoints(chemical_summary, category = "Chemical", filterBy = "Atrazine")
plot_tox_endpoints(chemical_summary, category = "Chemical", top_num = 10)
single_site <- dplyr::filter(chemical_summary, site == "USGS-04024000")
plot_tox_endpoints(single_site, category = "Chemical", top_num = 10)
# }
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4