-
Notifications
You must be signed in to change notification settings - Fork 13
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
API proposal for bridging {ospsuite}
and {tlf}
packages
#674
Comments
This comment was marked as outdated.
This comment was marked as outdated.
Steps needed:
|
Following plot types are prio one: -
|
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Basically,
This is also why I would prefer to add data with methods only, and not in the constructor. Otherwise the constructor get way too many arguments. The most simple workflow would then be:
And now the most important questions - how to store simulation results internally? The easiest way would be to convert them to |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
is this a problem ? name can be null (or "") not sure what makes more sense |
Currently, in this situation, empty dataframes will be returned: library(ospsuite)
#> Loading required package: rClr
#> Loading the dynamic library for Microsoft .NET runtime...
#> Loaded Common Language Runtime version 4.0.30319.42000
dataset <- DataSet$new()
myCombDat <- DataCombined$new()
myCombDat$addDataSets(dataset)
myCombDat$toDataFrame()
#> # A tibble: 0 x 14
#> # ... with 14 variables: name <chr>, group <chr>, dataType <chr>,
#> # xValues <dbl>, xUnit <chr>, xDimension <chr>, yValues <dbl>, yUnit <chr>,
#> # yDimension <chr>, yErrorValues <dbl>, yErrorType <lgl>, yErrorUnit <lgl>,
#> # molWeight <lgl>, lloq <lgl>
myCombDat$dataTransformations
#> # A tibble: 0 x 5
#> # ... with 5 variables: name <chr>, xOffsets <dbl>, yOffsets <dbl>,
#> # xScaleFactors <dbl>, yScaleFactors <dbl>
myCombDat$groupMap
#> # A tibble: 0 x 3
#> # ... with 3 variables: group <chr>, name <chr>, dataType <chr>
myCombDat$names
#> character(0) Created on 2022-01-24 by the reprex package (v2.0.1.9000) |
All data added to a So adding a |
I think I am confused because I don't understand the context in which this might occur, or what's the use case for this. But why should something that doesn't exist get a unique identifier? My understanding is that if there is no |
I agree with this. This is how I understand the object |
A perfectly valid Also - do all |
YEs. This is what is being displayed in the tree. If it's emopty, someone messed around with the pkml file
Yes! but how can you enforce it if you do not want to force the user to specify a name in the constructor. |
I would be OK forcing the user to specify the name when creating an empty |
As requested by @PavelBal, I am creating separate discussion threads for each plot specification. This makes the current issue outdated and relevant only for reference. So I am closing to reduce its interference. The issue will continue to be pinned until all plotting functions have been implemented. |
I will keep updating references in this comment to the discussions as they are opened:
|
@PavelBal, @Yuri05, @StephanSchaller Out of possible scatter plots, we currently have:
But not
Is it not useful? tlf does support this plot ( |
I think it is useful :) |
Yes, but very low prio. |
It's already implemented in #1036. |
I have updated my top-level comment in this issue with an implementation note, which should be helpful for whoever takes over implementing new plots in |
Currently, plots which are supported in |
Original Proposal
Based on discussion with @msevestre, @PavelBal, @pchelle, @Yuri05
Adopt a functional approach to create plots using
{tlf}
with a few arguments and sensible internal defaults.The primary argument would be an R6 object encapsulating both simulated and observed data from
{ospsuite}
.As to which arguments these plots should have remains to be decided (see the comment below with possible arguments).
Implementation note
Having already implemented a few functions, here are some notes on how to add new plotting functions in
{ospsuite}
.{ospsuite}
-based plotting functions are wrappers around{tlf}
-based plotting functions with a one-to-one correspondence.{ospsuite}
-based plotting functions requireDataCombined
(can't be missing) andDefaultPlotConfiguration
(if missing, defaults are used) objects.DataCombined
provides data to visualize, whileDefaultPlotConfiguration
provides plot's aesthetic properties.{tlf}
-based plotting function requires a specific variant ofPlotConfiguration
object (e.g.tlf::plotObsVsPred()
needstlf::ObsVsPredPlotConfiguration
object).{ospsuite}
-based plotting functions internally convert user-specifiedDefaultPlotConfiguration
object to the specific variant ofPlotConfiguration
object needed by{tlf}
-based plotting function (using helperospsuite:::.convertGeneralToSpecificPlotConfiguration()
).The text was updated successfully, but these errors were encountered: