R Snippets

How to combine several date columns into one: weather <- data.frame(Year.UTC=c(2012, 2013), Month.UTC=c(1,2), Day.UTC=c(1,2), Hour.UTC=c(22,23)) weather <- within(weather, datetime <- as.POSIXct(paste(Year.UTC, Month.UTC, Day.UTC, Hour.UTC, sep=”-“), format=”%Y-%m-%d-%H”, tz=”UTC”)) Link Plot multiple histograms in vertical stack based on a factor library(ggplot2) library(ggplot2) ggplot(movies, aes(x = rating)) geom_histogram(binwidth = 0.5, aes(fill =factor(Comedy))) + facet_grid(Comedy~.) Link Check the column … [Read more…]

Technique for safe cholecystectomy

Technique for safe cholecystectomy Misidentification is the #1 cause of bile duct injury. Seeing a funnel does NOT guarantee that this is the cystic duct: In the lower picture, the CHD is fused (inflammation) to the gallbladder wall, and the ‘funnel’ is from fusion, no the start of the cystic duct Safety first Two big … [Read more…]

Internal oblique flap for diaphragmatic hernia

Position the patient supine with the bump under the back more prominent on the left side. Mark the end of the costal margin on the left anterior axillary line with a dot Extend the incision transversely straight across the abdomen to the midline (just above the umbilicus usually) Make the incision transversely down through the … [Read more…]