Skip to content

Instantly share code, notes, and snippets.

@muschellij2
Created November 4, 2014 02:26
Show Gist options
  • Save muschellij2/eb81726d3c51011815fe to your computer and use it in GitHub Desktop.
Save muschellij2/eb81726d3c51011815fe to your computer and use it in GitHub Desktop.
Simple function to take DESCRIPTION file and make sure title case for CRAN submission
title_desc = function(file) {
require(Hmisc)
desc = read.dcf(file)
title = desc[, "Title"]
ss = strsplit(title, " ")[[1]]
ss = capitalize(ss)
ss = paste(ss, collapse = " ")
desc[, "Title"] = ss
write.dcf(desc, file=file)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment