Fast-track publishing using knitr: exporting images for sharing and press (part III)

Images can be a powerful medium if used right. The photo is CC by alemdag.

Images can be a powerful medium if used right. The image is CC by alemdag.

Fast-track publishing using knitr is a short series on how I use knitr to speedup publishing in my research. This is the third article in the series devoted to plots. Hopefully you will through this post have the need-to-know stuff so that you can (1) add auto-numbering to your figures, (2) decide on image formats, (3) choose image resolution, and (4) get anti-aliasing working. Continue reading

Fast-track publishing using knitr: the setup using .RProfile with custom CSS + some HTML goodies (part II)

Flexing RStudio/knitr where you want can be a challenge. The image is CC by Ben Barnes.

Flexing RStudio/knitr where you want can be a challenge. The image is CC by Ben Barnes.

Fast-track publishing using knitr is a short is a short series on how I use knitr to get my articles faster published. This is part II where I will show how you can tweak RStudio into producing seamless MS Word-integration by using the .RProfile together with CSS, a few basics about HTML that might be good to know, and lastly some special characters that can be useful. In the previous post, part I, I explained some of the more general concepts behind fast-track publishing and why I try to get my manuscript into MS Word instead of using LaTeX or other alternatives. Continue reading

Fast-track publishing using knitr: intro (part I)

A beautiful old document. Probably state of the art in those days. The image is CC by storebukkebruse.

A beautiful old document. Probably state of the art in those days. The image is CC by storebukkebruse.

Fast-track publishing using knitr is a short series on how I use knitr to get my articles faster published. By fast-track publishing I mean eliminating as many of the obstacles as possible during the manuscript phase, and not the fast-track some journals offer. In this first introductory article I will try to (1) define the main groups of obstacles I have experienced motivating knitr, (2) options I’ve used for extracting knitted results into MS Word. The emphasis will be on general principles and what have worked for me. Continue reading

The forestplot of dreams

A forestplot that compares Swedish and Danish EQ-5D outcome predictors

A forestplot that compares Swedish and Danish EQ-5D outcome predictors generated with the forestplot2()-function in the Gmisc-package

Displaying large regression models without overwhelming the reader can be challenging. I believe that forestplots are amazingly well suited for this. The plot gives a quick understanding of the estimates position in comparison to other estimates, while also showcasing the uncertainty. This project started with some minor tweaks to prof. Thomas Lumleys forestplot and ended up in a complete remake of the function. In this post I’ll show you how to tame the plot using data from my latest article. Continue reading

Pills instead of surgery?

It is not every day you find something as beautiful as research that can change your perception of the world. The image is CC from photophilde.

It is not common to find something as research that can change your perception of the world – it’s a beauty. The image is CC from photophilde.

I recently stumbled upon one of the most interesting articles in a while. Albert et al. questioned the long-standing theory behind low back pain by doing a double-blind randomized clinical controlled trial. They randomized patients to antibiotics or placebo for 100 days and found an impressive effect on pain and other outcomes in the treatment group. Continue reading

Too tight?

Compartment syndrome is a feared complication that can be both limb- and life-threatening. The image is CC by jαγ Δ.

Compartment syndrome is a feared complication that can be both limb- and life-threatening. The image is CC by jαγ Δ.

Compartment syndrome occurs most commonly after trauma to the lower leg. It causes excruciating pain and may result in muscle death and in some sever cases even death. Detecting these is therefore of uttermost importance and McQueen et al’s recent study on the subject is very welcome. They show that continuous intracompartmental pressure measurement in a clinical setting is feasible and has a high sensitivity and specificity. Continue reading

Too crude to be true?

Harvesting the magical update() function. The image is CC by Waldemar Horwat.

Harvesting the magical update() function. The image is CC by Waldemar Horwat.

The key to programming is being lazy; it has actually been called a virtue by some. When I discovered the update() function it blew me away. Within short I had created a monster based upon this tiny function, allowing quick and easy output of regression tables that contain crude and adjusted estimates. In this post I’ll show you how to tame the printCrudeAndAdjusted() function in my Greg-package and show a little behind the scenes. Continue reading

In sickness and in health

Pubmed trends showing how the popularity of analyzing comorbidities have increased over time. The search query is "Arthroplasty[MeSH Major Topic] AND (comorbidity OR co-morbidity)",  for the blue bar I also added "AND (Charlson OR Elixhauser)" to indicate that the popularity of using scores that summarize the comorbidities also are increasing.

Pubmed trends showing how the popularity of analyzing comorbidities have increased over time. The search query is “Arthroplasty[MeSH Major Topic] AND (comorbidity OR co-morbidity)”, for the blue bar I also added “AND (Charlson OR Elixhauser)” to indicate that the popularity of using scores that summarize the comorbidities also are increasing.

When I started my PhD-studies I had this idea that if we know the exact medical status of the patients and implant characteristics we will be able to explain why and when people are re-operated after total hip replacements (THR). Three years later I have just published an article in the Bone and Joint Journal about how wrong I was. In this post I’ll try to give some personal reflections on the article. Continue reading

The rotator cuff dilemma

A black-shouldered kite just after a meal, a beautiful picture that is CC and made by David Jenkins.

A black-shouldered kite just after a meal, a beautiful picture that is CC and made by David Jenkins.

Although I’m not a shoulder surgeon, I find the rotator cuff injuries fascinating. The rotator cuff is a group of muscles that surround the shoulder, providing motion and stability. Out of the four muscles, the top one is usually the most troublesome, the supraspinatus. It has a sensitive tendon that can both become irritated and cause pain and be a vital part of a rotator cuff rupture. In this post I’m going to focus on the rupture part, also commonly known as a rotator cuff tear. Note, this is not a complete review of this vast subject, more my personal reflections.
Continue reading

Dealing with the degenerative meniscus – to cut or not to cut?

The most common symptom that an orthopaedic surgeon treats is pain, while simple in concept it turns out to be surprisingly difficult to pin down the cause. The picture is a bed of nails and CC by Ormando Madoery

The most common symptom that an orthopaedic surgeon treats is pain, while simple in concept it turns out to be surprisingly difficult to pin down the cause. The picture is a bed of nails, CC by Ormando Madoery

Degenerative meniscal tears in the knee are a truly elusive problem for orthopaedic surgeons. As I have previously posted, degenerative meniscal tears are a common MRI finding in the healthy population above 40 years of age, and fail to correlate with actual knee symptoms, such as pain. As a surgeon it is tempting to try surgery for these injuries, but there is an increasing pile of evidence against this. This post is a comment on the most recent evidence, a NEJM study by Katz et al. Continue reading