Created
          January 11, 2013 20:11 
        
      - 
      
- 
        Save aaronwolen/4513600 to your computer and use it in GitHub Desktop. 
    Paste directly to Mac clipboard
  
        
  
    
      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
    
  
  
    
  | clipboard <- function(x, sep.lines = FALSE){ | |
| clipboard <- pipe('pbcopy', 'w') | |
| if(sep.lines){ | |
| x <- unlist(strsplit(as.character(x), split = ",")) | |
| x <- sub(" ", "", x) | |
| } | |
| write.table(x, clipboard, sep = "\t", | |
| quote = FALSE, col.names = FALSE, row.names = FALSE) | |
| close(clipboard) | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment