Skip to content

Instantly share code, notes, and snippets.

@ottadini
Created December 5, 2013 03:31
Show Gist options
  • Save ottadini/7799691 to your computer and use it in GitHub Desktop.
Save ottadini/7799691 to your computer and use it in GitHub Desktop.
Function to wrap and add newlines to R strings (for labels and titles in plots).
wrap <- function(string){
paste(strwrap(string), collapse="\n")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment