Tables from R into Word

A good looking table matters!

A good looking table matters!

This tutorial is on how to create a neat table in Word by combining knitr and R Markdown. I’ll be using my own function, htmlTable, from the Gmisc package.

Update: With the latest RStudio verions getting tables from R into Word is even easier, see my new post on the subject.

Background: Because most journals that I submit to want the documents in Word and not LaTeX, converting my output into Word is essential. I used to rely on converting LaTeX into Word but this was tricky, full of bugs and still needed tweaking at the end. With R Markdown and LibreOffice it’s actually rather smooth sailing, although I must admit that I’m disappointed at how bad Word handles html. Continue reading

Simply better?

Simple things are often beautiful. The image is CC, a work by: Ferran Jordà / bw-color.com .

Simple things are often beautiful. The image is CC, a work by: Ferran Jordà / bw-color.com .

The gap between regular health care and research can sometimes be overwhelming. The researchers have the tools, the hospital change routines all the time, but they almost never meet. I’m therefore pleased to see Åstrand et al’s simple article, a follow-up of a screening program for osteoporosis that showed a decrease fracture risk about 50 %. Continue reading

Are the tourniquet’s days over?

Does a tournique leave a sour aftertaste? The image is CC by Capsicina.

Do tourniquets leave a sour aftertaste? The image is CC by Capsicina.

Total knee arthroplasties are common procedures, about 12-13 000 primary procedures are performed each year in Sweden (population 9 million). Since over 90 % of Swedish surgeons operate in a bloodless field (applying a tourniquet to the leg prior to incision), it is interesting to see research questioning our use. Could 2013 be the beginning of the end for the tourniquet in knee arthroplasties? Continue reading

Chocolate and the Nobel Prize – a true story?

Chocolate - a close up picture

Few of us can resist chocolate, but the real question is: should we even try to resist it? The image is CC by Tasumi1968.

As a dark chocolate addict I was relieved to see Messerli’s ecological study on chocolate consumption and the relation to the Nobel prize. By scraping various on-line sources he made a robust case for that increased chocolate consumption correlates to the number of Nobel prizes. Combined with that it might have positive impact on blood pressure, the evidence is strong enough for me to avoid changing any habits, at least over Christmas 🙂

Tutorial: Scraping the chocolate data with R

Inspired by Messerli’s article I decided to look into how to repeat the analysis in R. Continue reading

Achilles tendon ruptures – to operate or not to operate

Squash is one of my favorite sports, although unfortunately plagued by frequent achilles tendon ruptures as all racket sports. The image is CC by penguincakes.

A recent meta-analysis comparing treatments for achilles tendon ruptures caught my eye. This is probably one of the most commonly debated injuries among young orthopaedic surgeons; “what would you do if you’re achilles ruptured?”. After a few beers we can keep at it for hours… Maybe we can finally move to more interesting topics after Soroceanu et al’s excellent article. Continue reading

Creating an R package in Windows

The packaging of "nothing". An aura or vibe or spirit. To showcase that sometimes the packaging and the perception of the product, IS the product.

A nice package can be both beautiful and functional. The image is CC by MIAD Communication Design.

Inspired by this post by Szilard Pafka I decided to do a similar adventure in a Windows environment and see what problems I run into.

Start by installing Eclipse & StatET, the installation can sometimes cause some annoyances. I’ve covered a lot of them in my previous post. Continue reading

Is the golden age of surgery over?

An image showing bacteria surviving extreme environments. The image is CC by Dan Graham.

Any orthopaedic surgeon’s (and patient’s) nightmare is postoperative infections. Luckily these have been rare 0,5-1 %, much thanks to sterile technique and antibiotics. Dale et al’s article is therefore of considerable concern: There seems to be a significant increase the number of infections. If this is true, we may see an end to the expansion of orthopaedic surgery… Continue reading

Keeping the blood flowing

A waterfall with beautiful softness illustrating the delicacy of flow

Keeping the venous blood flowing after knee arthroplasty is vital. The image is CC by Dominik Starosz

As always it is interesting with a randomized controlled trial (RCT). I recently stumbled upon Westrich et al’s RCT on prophylaxis after knee arthroplasties. They randomized between aspirin and enoxaparin (LMWH) where both groups received mechanical pumps immediately after surgery. The difference in DVT:s was really small, 14% vs 18% in favor for enoxaparin. This was not significant in 275 patients. Continue reading

To trust or not to trust an MRI

MRI images can be hard to interpret, especially the meaning of different findings. The image is CC by Becky Stern

In my daily clinical work I’m often confronted with long descriptions of MRI exams by radiologists, and frequently my final conclusion is: nothing out of the ordinary. It is therefore nice to see articles from Felson’s team, where they try to shed some light onto the issue.

Englund et al showed previously that an ostearthritic knee early on has degenerative meniscal changes, and the MRI-findings of these often cause distress among both GP:s and patients. Guermanzi et al’s study goes even further, and examines knees without osteoarthritis (Kjellgren-Lawrence 0) to see what an MRI can say about a painful knee in patients above 50 years of age.

Continue reading