Guest User

Untitled

a guest
Jun 17th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #!/usr/bin/r
  2. TSVSNAP.FILE = paste("snap/", Sys.Date(),".tsv", sep="")
  3. tsvsnap = function(obj, ...){
  4. UseMethod("tsvsnap")
  5. }
  6. tsvsnap.summary.lm = function(obj) tsvsnap.table( as.table( coefficients( obj ) ) )
  7. tsvsnap.table = function(obj){
  8. cat("", colnames(obj), file=TSVSNAP.FILE, sep="\t", append=TRUE, "\n")
  9. rows = rownames(obj)
  10. row.num = length(rows)
  11. for( x in 1:row.num ){
  12. cat(rows[x], obj[x,], file=TSVSNAP.FILE, sep="\t", append=TRUE, "\n")
  13. }
  14. cat("\n",file=TSVSNAP.FILE, append=TRUE)
  15. }
  16. tsvsnap.default = function(obj) cat(obj, file=TSVSNAP.FILE, sep="\t", append=TRUE,"\n\n")
Add Comment
Please, Sign In to add comment