Created
          November 4, 2014 02:26 
        
      - 
      
- 
        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
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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