Medical R

automated-redcap-pull-data

This post will walk you through how to set up automated data pulls and summaries from a REDCap database to a secure firewalled server.

Sending Automated Emails with Cron Jobs

It is nice to be able to automate something, and have programmatic data pulls. Then wrangle the results and email them to key stakeholders. This is a quick tutorial on how to do that with R and cron jobs, especially with cronR package.

Functions and Functionals: TidyEval Fun

Two approaches to use tidyeval to work in both individyal functions and with functionals like map and map2.

Making a Multipanel Figure with a Single Bottom Legend

A way to create the common figure in medical journals with multiple panels and a single legend for all panels at the bottom.

Obtaining a Zenodo DOI for your R project or package

How to use Zenodo to obtain a Digital Object Identifier (DOI) for your R project or package in a GitHub repo.

Creating Standard Mileposts in your Bookdown Book

How to create and use recurring fun icons for mileposts within a bookdown book, as inspired by the work of Desiree De Leon.

Using the {webexercises} package to add mini-interactive exercises to bookdown

Using the {webexercises} package by Lisa Debruine can help you add interactive exercises to your bookdown book, including True/False, multiple choice, short fill in the blank, and hide/unhide for hints or solutions. This can be very helpful for quick feedback to check understanding. Custom CSS is used for the styling and buttons, and Custom JavaScript for testing correctness and using CSS styles.

Resources for Getting Started in R

An assortment of resources for learning R, for beginner to advanced users.

Extracting Highlighting as Data from Excel Spreadsheets with {tidyxl}

Sometimes well-meaning people encode variables in medical data as highlighting with colors. For example, a spreadsheet where the control patients are in the green rows, and the test patients are in the red rows. This should have been encoded as a study_arm variable with values control and test. How to fix this - the {tidyxl} package can get under the hood of an excel spreadsheet and extract this information.

Creating Mini learnr Apps and Hosting on a Server

This post will explain how to create your own learnr apps and push them to an RStudio Server Open Source server.

Publishing a {bookdown} book on bookdown.org

A short overview of creating a {bookdown} book and publishing on bookdown.org

Setting Up a RStudio Server with the Open Source Edition

This is a basic setup guide for setting up a Linux-based server with RStudio Server and Shiny Server (the free versions). This was contributed by Javan Thompson, who works in IT at the University of Michigan Medical Center, and was a great help in setting this up for me. He has graciously provided a basic walkthrough for anyone else to follow.

Subgroup Plots for Clinical Trials

Sometimes editors ask for _post hoc_ analysis of subgroups in clinical trials, and will refuse the manuscript without them. How you can make these in R, in a somewhat kludgy way.

How to Embed External micro-Flipbooks in Bookdown

After you have created micro-flipbooks in your miniflipbook project, how do you embed them in Rmarkdown and bookdown projects?

Building a Data Package

For building a package that is largely about making datasets readily available in R.

How to Post

A reference for future me, on how to create posts.

micro-flipbooks

How to make embeddable micro-flipbooks (single topic example) for embedding in bookdown HTML in e-books

Why a Medical R Blog?

A starting point and few Theses.

Welcome to Medical R

Welcome to my blog, Medical R. I will blog on topics related to using R with medical data. I hope you enjoy reading and find this useful!

More articles »

Medical R