{"id":14069086,"url":"https://github.com/zappingseb/shinymetaTest","last_synced_at":"2025-07-30T05:31:15.167Z","repository":{"id":98365936,"uuid":"196527549","full_name":"zappingseb/shinymetaTest","owner":"zappingseb","description":"An example App to test shinyMeta","archived":false,"fork":false,"pushed_at":"2019-08-12T14:53:28.000Z","size":88,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-04T10:39:12.135Z","etag":null,"topics":["r","shiny-apps","shiny-r","shinymeta"],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zappingseb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-12T07:08:23.000Z","updated_at":"2022-10-05T23:10:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"56782b79-3cbb-4e79-9b57-d5e200efebe6","html_url":"https://github.com/zappingseb/shinymetaTest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zappingseb/shinymetaTest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zappingseb%2FshinymetaTest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zappingseb%2FshinymetaTest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zappingseb%2FshinymetaTest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zappingseb%2FshinymetaTest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zappingseb","download_url":"https://codeload.github.com/zappingseb/shinymetaTest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zappingseb%2FshinymetaTest/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267815187,"owners_count":24148356,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["r","shiny-apps","shiny-r","shinymeta"],"created_at":"2024-08-13T07:06:35.741Z","updated_at":"2025-07-30T05:31:14.882Z","avatar_url":"https://github.com/zappingseb.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"# shinymeta - my first try\n\nTrying a multi output shiny app with reproducibility by [shinymeta](https://github.com/rstudio/shinymeta)\n\n## App example\n\nThis repo contains two apps that try using the new [shinymeta](https://github.com/rstudio/shinymeta) package. The apps basically\n\n1. `Filter` one data set (`event_data`)\n2. `Select` a second data set (`pat_data`)\n3. Merge the two data sets on keys\n4. Create a linear model from measurements in `event_data` vs selected columns in `pat_data`\n5. Plot the linear model\n6. Show the summary of the linear model\n7. Make it reproducible by a \"Show R Code\" button\n\n![App screenshot](./example_app.png)\n\n## Installation\n\nget shinymeta from github by\n\n```r\ndevtools::install_github(\"rstudio/shinymeta\")\n```\n\n## Why reproducibility?\n\nThe example shown here is a typical analysis in clinical studies. Though the data is totally randomized.\n\nFor the clinical study the biostatistician wants to see different plots for different events. He wants\nto take the one with the highest impact into the\nstudy report. This study report will be send to authorities like [**FDA**](https://en.wikipedia.org/wiki/Food_and_Drug_Administration). The **FDA** would like to see how\nthe plot was produced and which data went in. The reproducibility feature would allow the **FDA**\nto create the plot themselves by having the app or the report + code.\n\n## Why 2 apps?\n\n`app.R` contains an app that just uses `metaReactive`s like shown in the example by\n[`shinymeta`](https://github.com/rstudio/shinymeta). I basically tried to put everything in. This app\nthough produces some ugly code\n\n```r\nformula_reactive \u003c- AVAL ~ AGE\n```\n\nI just wanted to see the outcome of this in my reproducible code. So e.g. `AVAL ~ AGE`. Therefore I tried to use\na standard `shiny::reactive` instead of a `metaReactive` in the second app `app_mixed_reactives.R`:\n\n```r\nformula_reactive \u003c- reactive({\n    validate(need(is.character(input$select_regressor), \"Cannot work without selected column\"))\n\n    regressors \u003c- Reduce(function(x, y) call(\"+\", x, y), rlang::syms(input$select_regressor))\n    rlang::new_formula(rlang::sym(\"AVAL\"), regressors)\n  })\n\n  # Create a linear model\n  model_reactive \u003c- metaReactive2({\n    validate(need(is.data.frame(data_set_reactive()), \"Data Set could not be created\"))\n    validate(need(is.language(formula_reactive()), \"Formula could not be created from column selections\"))\n\n    metaExpr({\n      model_data \u003c- !!data_set_reactive()\n      lm(formula = !!formula_reactive(), data = model_data)\n    })\n  })\n```\n\n**surprisingly** it worked and the R Code looks nice\n\n![RCode in App](rcode.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzappingseb%2FshinymetaTest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzappingseb%2FshinymetaTest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzappingseb%2FshinymetaTest/lists"}