Repository navigation
Releases
gsm.bio v0.4.0
gsm.bio v0.4.0
See it move: the annotated v0.4.0 demo has captures, try-it steps and the detail behind everything below.
gsm.bio v0.4.0 is the six charts as one Shiny app. It reads a study from your own files and takes every statistic from the R session behind the page. It is written to go on Posit Connect as one file, and no one has put it there yet. Nothing a widget, a figure or a table did in v0.3.0 has changed. It needs shiny, and is released together with bio.viz v0.4.0.
What's new
- The six charts are one app.
RunApp()returns a Shiny app with a header, a pill for each chart, and a chip that says what the charts are drawn on: your own results table, with participants and outcomes when you have them, or the synthetic study. obot.roadmap#399, obot.roadmap#400, #72, #84, PRs #76, #92 - The app reads your own files. Its Data page takes a results file, and optionally participants and outcomes, as
.csv,.xptor.sas7bdat. Each file's card asks which column is which, filled in where a name matches and marked in amber where you have still to say. A rail counts what is left. Nothing is kept after the session. obot.roadmap#399, obot.roadmap#400, #73, #85, PRs #77, #95 - The Data page shows what is loaded. The tables the charts are drawn on are there in tabs, ten rows at a time, with where each came from, and a file just chosen shows its first rows under its own column names. A file chosen by mistake is taken away from its card. obot.roadmap#399, #80, #85, PRs #81, #95
- Every view has its statistics, from the server's R. In the app a chart asks the R session behind the page each time, so a view no saved widget stores is answered, and the line under the chart says which R computed it. obot.roadmap#399, #71, PR #75
- The widgets run in a Shiny page of your own. Each widget has an output and a render function, and
Serve_Statistics(), called once in the server function, answers whatever a chart asks. obot.roadmap#399, #71, PR #75 - How to put the app on Posit Connect. The article The app, and putting it on Posit Connect gives the one-file deployment, the
rsconnectcall, what the server needs and the times measured on the synthetic study. obot.roadmap#399, #74, PR #78
Also in this release
- Not tested: the app on a Posit Connect server. No one has deployed it yet. The app is tested in a browser on one machine; the first deployment is the check on the rest. #74
- A file that would be read short is not drawn. A
.csvwith a byte outside UTF-8, or a quote out of place, is refused, and the page says why. #86, #97, PRs #91, #104 - Not fixed: an
.xptfile that has been cut short is read short, with no word from haven. Check the rows the Data page counts against your own. #90 - A widget's text keeps its size in a Shiny page. Each output function writes one rule into the page so that Shiny's default page does not shrink it. #80, PR #81
- The widgets carry bio.viz v0.4.0, which adds the way a chart reaches R on a server. #79, #93, PRs #82, #94
- Not fixed: Fisher's exact test on larger tables, as in v0.3.0: the result carries R's message and no p-value. #64
Tests and provenance
413 tests (61,643 expectations on R 4.3.3) pass from the source tree; R CMD check skips 36 of them. The app is run by a second R session and driven in a headless browser, where every answer on each of the six charts is held to its Analyze_*() function. The bundles are bio.viz dev at 066bbec and safety.viz dev at 096cc26.
gsm.bio v0.3.0
gsm.bio v0.3.0
See it move: the annotated v0.3.0 demo has captures, try-it steps and the detail behind everything below; its last section is the widget.
gsm.bio v0.3.0 draws the group comparison from R at the three levels bio.viz v0.3.0 draws it at, and stores every test those levels ask for in the page, so a saved file shows all three with no R and no network. Two new statistics functions answer a whole row of visits in one call. It is released together with bio.viz v0.3.0.
What's new
- The group comparison widget has three levels.
Widget_GroupComparison()opens on a trend tile for every biomarker; a tile opens one biomarker across its visits, with R's test stored under each visit; a visit's name opens that visit alone. A view that was not computed says so. A call that named a biomarker and no visit opened on a panel per visit and now opens on the picture over time. obot.roadmap#367, #53, PR #57 - A group test at every visit, in one call.
Analyze_GroupDifferenceBy()runs the group test within each level of a column and returns a row per level, with R's p-value and, when a method is named, the same p-value adjusted across the levels byp.adjust(). The same groups are tested at every level, so a level where one of three groups has nobody is not computed. obot.roadmap#367, #52, PR #54 - A grid of differences, in one call.
Analyze_DifferenceGrid()returns the standardised difference between two groups for every biomarker at every level, with its interval and no p-value. Nothing draws it yet. #52, PR #54 - Unscheduled visits are left out, by one rule everywhere. The widget,
Visualize_GroupComparison()andTable_GroupComparison()leave them out as the chart does, unlessunscheduled_visits = TRUE. #53, PR #57 - Fisher's exact test runs on tables with small margins.
Analyze_Contingency()no longer applies the minimum group size to Fisher's exact test, so a table with a row or a column of fewer than five returnsfisher.test()'s p-value where it returned no test. The chi-square test keeps the minimum. obot.roadmap#353, #46, PR #55
Also in this release
- The widgets carry bio.viz v0.3.0, copied from bio.viz at a303f6b, the commit its v0.3.0 was released from; the suite holds every copied file to that tag. #59, PR #60
- The tests open a saved page in a browser, with the network off, and every request its chart makes must be answered from the page. #53, PR #57
- Not fixed: Fisher's exact test on larger tables. For a table of four categories by four with 200 participants,
fisher.test()can stop on its workspace limit, and the result carries R's message and no p-value. This is not new; the chi-square test answers such a table. #64 - Not in this release: the widget's difference grid, paused with the chart's. obot.roadmap#371
Tests and provenance
340 tests (54,896 expectations on R 4.3.3) pass from the source tree, which needs to reach GitHub; R CMD check skips 15 of them. Every statistic a widget stores, a figure prints or a table holds is held to its Analyze_*() function, and the tests under one biomarker over time to bio.viz's fixtures of what desktop R answered. The bundles are bio.viz dev at a303f6b and safety.viz dev at 096cc26.
gsm.bio v0.2.0
gsm.bio v0.2.0
See it move: the annotated v0.2.0 demo has captures and try-it steps for everything below.
gsm.bio v0.2.0 draws the rest of bio.viz's charts from R and adds output from R. Two new widgets, the cross-tabulation and the stratified survival chart, carry R's tests in the page, and the biomarker screen adds hazard ratios. Every chart can now be drawn without a browser as well: a static figure, its statistics as a table and in RTF, and a whole list of the specifications bio.viz's charts write, run in one call. Each output prints the same Analyze_*() answers its chart does.
What's new
- Cross-tabulation widget.
Widget_CrossTab(): a two-way table of counts of two columns or cut biomarkers, with R's chi-square and Fisher's exact test stored in the page, and each cell's participants a click away. obot.roadmap#359, #18, #31 - Stratified survival widget.
Widget_StratifiedSurvival(): Kaplan-Meier curves by a column or a cut biomarker on one endpoint of an outcomes table, with the number at risk, and R's log-rank test, medians and hazard ratio stored in the page. The outcomes table has one row per participant and endpoint, with the time to the event and a flag. The flag can say the time was censored (1 = censored, as ADaM'sCNSR) or that the event happened (1 = event). obot.roadmap#360, #35, #36 - Hazard ratios in the biomarker screen. Given an outcomes table,
Widget_BiomarkerScreen()offers a hazard ratio of high against low on an endpoint, each biomarker cut at its median, and every row opens its survival curves with R's test stored too. The outcomes table is a new argument,dfOutcomes, the last one, so every v0.1.0 call, by position or by name, works as it did. obot.roadmap#360, #35, #36, #48 - Static figures. Six
Visualize_*()functions, one per chart, return a ggplot2 figure of the view its chart opens on, from the same settings, with the sameAnalyze_*()statistics printed under it. Titles, subtitles and footnotes take the chart's placeholders, and the figure writes its own footnote last, with R's method and counts. The survival figure draws R's ownsurvfit()curves with their bands. ggplot2 is suggested, not imported. The gallery shows each figure beside its widget. obot.roadmap#362, #37, #40 - Statistics tables and RTF. Six
Table_*()functions, one per chart, return the statistics of the view the chart opens on as a data frame, one row per statistic. Each row has its method, estimate and interval, counts, the p-value by the display rules (exploratory, adjustment named, no stars) and R's reason where it was not computed. The numbers come from the sameAnalyze_*()calls the charts make.Write_RTF()writes a table, with its title and footnotes, to RTF through r2rtf, which is suggested, not imported. obot.roadmap#362, #38, #41 - Batch runs of chart specifications.
Run_Specifications()reads the specifications bio.viz's charts write and draws each against a dataset, as a figure (PNG, PDF or SVG) and an RTF table, into a folder, with a manifest of what was written. One specification can run across every biomarker, one figure and one table each. A specification is data and nothing in it is evaluated; one that cannot be read is refused with bio.viz's sentence, and the rest still run. The manifest counts the participants each view's filters keep and says what the tables could not honour, as bio.viz's notices do. obot.roadmap#362, #39, #42
Also in this release
- A biomarker cut into groups. A cut variable,
list(measure, visit, cut)orlist(col, type = "number", cut), makes groups at the median, the tertiles, the quartiles or typed points, by the same rule as bio.viz:quantile()with its default, andcut()with a value on a point in the lower group.Widget_GroupComparison()takes one as its groups or its panels, and hands R the groups low to high. The cross-tabulation runs a cut's groups low to high too. The survival chart hands them to R high to low, so its hazard ratio is the higher group's over the lower's. obot.roadmap#359, #18, #31 - Titles and footnotes on the widgets. Every widget takes bio.viz's
title,subtitleandfootnotessettings, with the chart's placeholders. The chart's own footnote names the R and gsm.bio versions that computed the results stored with the page, which the widget now hands it. obot.roadmap#362, #37, #40 - A filter set to no value lets nobody through, as the chart opens it. In R, a filter of several values whose
startis an empty list used to let everyone through. It now keeps no one, and each figure and table says no participant passes the filters. #39, #42 - A column's categories in the chart's order. The cross-tabulation's categories and the survival chart's groups of a column are handed to R as the chart draws them: by name with numbers as numbers, so "2 mg" comes before "10 mg" and "a" before "B". The chart finds its stored results for such columns again. A cut's order is unchanged. #44, #45
- An infinite odds ratio is kept. A stored result now writes R's
Inf,-InfandNaNas text, which bio.viz reads back as the numbers. Before, the page hadnull, so Fisher's odds ratio of a table with an empty cell disappeared. The cross-tabulation's figure now prints each estimate with its interval, as the chart's line does. The figure and the table name Fisher's odds ratio by its rows and columns, for example "odds ratio (A / B, odds of x against y)", and print an infinite one in words. For a two-by-two table with an empty cell they print, as the chart does: "odds ratio (A / B, odds of x against y): infinite, 95% confidence interval 14.86 to infinity." #44, #45 - Pages carry text as UTF-8 in any locale. A widget made in an R session whose locale is not UTF-8 (
Rscriptstarted with noLANG) wrote text that is not ASCII, such as a category "Ödem", into its page as escapes. The chart showed "<96>dem", and a view keyed by it said statistics are unavailable. Every widget now marks its tables', settings' and results' text as UTF-8 before it computes or writes anything. #22, #34 - The widgets carry bio.viz v0.2.0, with the specification schema the batch runner reads. They are copied from bio.viz
devat 35ccfd3, byte for byte the same as bio.viz's v0.2.0 tag (4440a43), and the copy's records name both. safety.viz stays at v1.9.0. #44, #45, #48
Tests and provenance
305 tests (34,632 expectations on R 4.3.3) pass from the source tree, where none may skip; R CMD check runs them too, skipping the ten that read the repository's own files. Every statistic a widget stores, a figure prints or a table holds is held to the Analyze_*() function on rows the test works out from the study's tables. Each figure is also held to a snapshot of the data and labels it draws, which are the same on every platform. The batch runner's reader is held to bio.viz's own reader, run in node on the same specifications: the format's rules case by case, and every setting of every chart given each of 21 values (4,578 specifications). The rules R shares with the charts are held to frames, requests and filter states written by the vendored bundles: bio.viz dev at 35ccfd3, and through it safety.viz dev at 096cc26.
gsm.bio v0.1.0
gsm.bio v0.1.0
See it move: the annotated v0.1.0 demo has captures and try-it steps for everything below.
gsm.bio is the R behind the bio.viz biomarker charts: seven statistics functions, each a thin wrapper around the stats or survival function that computes it (only the standardised difference is the package's own), and four widgets that draw a bio.viz chart from R with those statistics stored in the page. A widget saved as one file opens anywhere, offline, and shows only R's numbers; a view it holds no numbers for says so.
What's new
- Group differences.
Analyze_GroupDifference(): Welch's t-test, Wilcoxon, ANOVA or Kruskal-Wallis, with the difference in means and Holm-adjusted pairs. obot.roadmap#364, #3, #7 - Correlations.
Analyze_Correlation()for one pair, overall and per group, andAnalyze_CorrelationMatrix()for every pair of several, each cell with its own count. obot.roadmap#364, #3, #7 - A fitted line.
Analyze_Fit():lm()or aloess()smooth, with the line and its band as points a chart draws as they are. obot.roadmap#357, #12, #14 - Contingency tables.
Analyze_Contingency(): chi-squared, flagging small expected counts, or Fisher's exact test. obot.roadmap#364, #3, #7 - Survival.
Analyze_Survival(): the log-rank test, each group's median, and the hazard ratio for two groups. obot.roadmap#364, #4, #8 - A screen across every biomarker.
Analyze_Screen(): one comparison on every biomarker, a row each, with p-values adjusted across the rows. obot.roadmap#364, #4, #8 - Group comparison widget.
Widget_GroupComparison(): the overview of every biomarker, and one biomarker with R's test under each visit. obot.roadmap#356, #9, #10 - Association scatter widget.
Widget_AssociationScatter(): a variable on each axis, with R's coefficient and fitted line for both methods and both fits. obot.roadmap#357, #13, #15 - Correlation matrix widget.
Widget_CorrelationMatrix(): a grid of R's coefficients; any cell opens its scatter, stored too. obot.roadmap#357, #13, #15 - Biomarker screen widget.
Widget_BiomarkerScreen(): one row per biomarker with R's estimate, interval and both p-values; any row opens its group comparison or scatter, stored too. obot.roadmap#358, #16, #17 - A synthetic study with known answers.
Synthetic_Results()and its tables: 200 participants, twelve biomarkers, five visits and three planted effects, whose true sizes are inSynthetic_Truth(). obot.roadmap#364, #2, #6
Also in this release
- One statistics file. The functions are defined once, in
inst/statistics/statistics.R, which needs only stats and survival, so the browser and the desk run the same lines. #3, #7 - Every result has one shape, with a reason in place of numbers and R's own warnings, never an error.
StatisticsResult(), #3, #7 - Data a statistic does not allow gets a reason, not a number. Values that do not vary, ranks all tied, no event in any group, or a smooth on fewer than seven pairs answers with a reason, never "ok" with a number that means nothing. A hazard ratio whose Cox interval is not finite, as when one of two groups has no events, is reported as not estimable, and the log-rank test is kept. #24, #26
- A result is the running R's answer: R 4.3 and R 4.6 can word a warning, or compute a p-value, differently. #4, #8
- The widgets need, and carry, safety.viz v1.9.0 and bio.viz v0.1.0. safety.viz v1.9.0 is the first with the kit bio.viz's charts are built from; each widget carries the copy bio.viz takes from safety.viz
devat its v1.9.0 release preparation, labelled 1.9.0 and not as an earlier release, so a page that also holds a gsm.safety widget loads one safety.viz, the newer, as htmlwidgets keeps the highest version of a dependency. Both commits are recorded. Filters follow safety.viz's rule: astartthe data lacks opens on All, andall = FALSEopens on the first value. The reader's browser may order accented letters and punctuation differently from R, so the widget names R's first value to the chart as the filter'sstart. #19, #20, #27, #28 - Checks and a reference site.
R CMD checkon every pull request, the suite rerun from the source tree, and the reference site deployed fromdev. #1, #5, #6
Tests and provenance
181 tests (28,853 expectations on R 4.3.3) pass from the source tree, where none may skip; R CMD check runs them too, skipping the nine that read the repository's own files. The group, correlation, matrix, fitted-line and screen statistics the charts print are held to desktop R's answers that bio.viz recorded on the same rows. Survival, contingency and the screen's hazard ratio are held to survdiff(), coxph(), chisq.test() and fisher.test() called directly. Every widget's stored results are held to the R functions, member by member. The rules R shares with the charts are held to frames, requests and filter states written by the vendored bundles: bio.viz dev at 29ac722, and through it safety.viz dev at a57dbb2.