Just spent ~ 90 minutes this morning toying with the text generation program I mentioned in a note yesterday.
dadadodo automatically creates pseudo random output based on input text. It’s a command line utility, and I have it installed on a Linux machine. Since I have a Shiny server running on the same box, I figured I’d see if I could combine the two and create a web app:
abstruct uses an R interface for the Pubmed API through the rentrez package to search for abstracts based on user input keywords. This premise depends on structured abstracts, which the National Library of Medicine indexes granularly (down to “Objectives”, “Results”, etc.) and exposes in the XML export for each record. The app crawls through X number of records that meet the search term (and have structured abstracts), then parses the XML for each section and passes a concatenated file to dadadodo for babbling via the R
The results are stored in a single variable that is accessed separately in each Shiny output object by using reactive elements.