-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactored tcplPlot and auxiliary functions to support any number of curves on a comparison plot #325
Open
cthunes
wants to merge
45
commits into
dev
Choose a base branch
from
311-update-tcplPlot-for-loec
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
also halved the 'number of curves' in the error comparison test cases that had too many plots for console plotting
get_plot_title/_caption, get_verbose_tables, dynamic_table_trunc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Removed
compare.val
param from tcplPlot and replaced it withcompare
. Usecompare
to choose a field from plot loaded data to compare on. For example,compare = "dsstox_substance_id"
will match all of the same chemical across the loaded data (say,fld= "aeid", val = c(<list of 4 endpoints>)
. If all 4 endpoints test the same chemicals, then the output (for 'pdf') would be a list of plots which contain 4 curves/point sets, each for a different chemical. By defaultcompare = "m4id"
, which means all samples will be plotted individually, since everym4id/s2id
is always unique.Use
dat
with preloaded -- and potentially manipulated data -- for more flexibility. For example one could load plot data usingtcplPlotLoadData
the same way we would intcplPlot
, then add a custom column, say for user decided compare grouping rather than just using the default available fields incompare
. Ifdat
is instead a list of data.tables, nocompare
field is needed and each list item will be interpreted bytcplPlot
as a separate comparison plot.If you have an especially large number of curves to plot on each comparison plot, the new type of compare plot could be useful. There are two new parameters to
tcplPlot
called and with defaults:group.fld = NULL
andgroup.threshold = 9
. This means at the specified (or default of 9)group.threshold
value, curves on comparison plots will be grouped differently by color and in the legend, and a verbose table will no longer be printed as it becomes excessively large. The defaultgroup.fld
if the number of curves on a plot exceedsgroup.threshold
ismodl
formc
andhitc
forsc
(up for suggestions on better defaults). Both are fully customizable, so you can use any field available in the data forgroup.fld
, including a custom field ifdat
is supplied, and any size small or large as a minimumgroup.threshold
to switch over to the other style. Setgroup.threshold
to a large number to effectively disable this functionality. The most common use case currently for this functionality is when plotting an entire endpoint on one comparison plot. Extensive tress testing has not been done for this to find the limits, but so far using a Tox21 endpoint, I have been successful up to about 3000 curves before I run into "node stack overflow" errors. I think ggplot may have some limits on the number of layers.Note -
verbose = TRUE
is the new default fortcplPlot
!248 new unit tests passing. devtools::check() successful. Closes #293. Closes #215. Closes #280. Closes #249. Closes #228. Closes #175. Closes #311.
Loec plotting is also included within this pull request.
tcplPlot PR.pptx